changed all lambda experssion variables to z from various where appropriate
This commit is contained in:
@@ -29,7 +29,7 @@ namespace AyaNova.Biz
|
||||
//EXISTS
|
||||
internal async Task<bool> ExistsAsync(long id)
|
||||
{
|
||||
return await ct.Vendor.AnyAsync(e => e.Id == id);
|
||||
return await ct.Vendor.AnyAsync(z => z.Id == id);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -72,7 +72,7 @@ namespace AyaNova.Biz
|
||||
do
|
||||
{
|
||||
newUniqueName = Util.StringUtil.UniqueNameBuilder(dbObject.Name, l++, 255);
|
||||
NotUnique = await ct.Vendor.AnyAsync(m => m.Name == newUniqueName);
|
||||
NotUnique = await ct.Vendor.AnyAsync(z => z.Name == newUniqueName);
|
||||
} while (NotUnique);
|
||||
newObject.Name = newUniqueName;
|
||||
newObject.Id = 0;
|
||||
@@ -90,7 +90,7 @@ namespace AyaNova.Biz
|
||||
//
|
||||
internal async Task<Vendor> GetAsync(long id, bool logTheGetEvent = true)
|
||||
{
|
||||
var ret = await ct.Vendor.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var ret = await ct.Vendor.SingleOrDefaultAsync(z => z.Id == id);
|
||||
if (logTheGetEvent && ret != null)
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, AyaEvent.Retrieved), ct);
|
||||
return ret;
|
||||
@@ -101,7 +101,7 @@ namespace AyaNova.Biz
|
||||
//
|
||||
internal async Task<Vendor> PutAsync(Vendor putObject)
|
||||
{
|
||||
Vendor dbObject = await ct.Vendor.SingleOrDefaultAsync(m => m.Id == putObject.Id);
|
||||
Vendor dbObject = await ct.Vendor.SingleOrDefaultAsync(z => z.Id == putObject.Id);
|
||||
if (dbObject == null)
|
||||
{
|
||||
AddError(ApiErrorCode.NOT_FOUND, "id");
|
||||
@@ -142,7 +142,7 @@ namespace AyaNova.Biz
|
||||
{
|
||||
try
|
||||
{
|
||||
Vendor dbObject = await ct.Vendor.SingleOrDefaultAsync(m => m.Id == id);
|
||||
Vendor dbObject = await ct.Vendor.SingleOrDefaultAsync(z => z.Id == id);
|
||||
ValidateCanDelete(dbObject);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
@@ -182,7 +182,7 @@ namespace AyaNova.Biz
|
||||
|
||||
public async Task<Search.SearchIndexProcessObjectParameters> GetSearchResultSummary(long id)
|
||||
{
|
||||
var obj = await ct.Vendor.SingleOrDefaultAsync(m => m.Id == id);
|
||||
var obj = await ct.Vendor.SingleOrDefaultAsync(z => z.Id == id);
|
||||
var SearchParams = new Search.SearchIndexProcessObjectParameters();
|
||||
if (obj != null)
|
||||
SearchParams.AddText(obj.Notes).AddText(obj.Name).AddText(obj.Wiki).AddText(obj.Tags).AddCustomFields(obj.CustomFields);
|
||||
@@ -211,7 +211,7 @@ namespace AyaNova.Biz
|
||||
if (!PropertyHasErrors("Name"))
|
||||
{
|
||||
//Use Any command is efficient way to check existance, it doesn't return the record, just a true or false
|
||||
if (await ct.Vendor.AnyAsync(m => m.Name == proposedObj.Name && m.Id != proposedObj.Id))
|
||||
if (await ct.Vendor.AnyAsync(z => z.Name == proposedObj.Name && z.Id != proposedObj.Id))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Name");
|
||||
}
|
||||
@@ -219,7 +219,7 @@ namespace AyaNova.Biz
|
||||
|
||||
|
||||
//Any form customizations to validate?
|
||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(x => x.FormKey == AyaType.Vendor.ToString());
|
||||
var FormCustomization = await ct.FormCustom.AsNoTracking().SingleOrDefaultAsync(z => z.FormKey == AyaType.Vendor.ToString());
|
||||
if (FormCustomization != null)
|
||||
{
|
||||
//Yeppers, do the validation, there are two, the custom fields and the regular fields that might be set to required
|
||||
|
||||
Reference in New Issue
Block a user