This commit is contained in:
@@ -72,20 +72,11 @@ namespace AyaNova.Biz
|
|||||||
//put
|
//put
|
||||||
internal async Task<bool> PutAsync(DashboardView dbObject, string theView)
|
internal async Task<bool> PutAsync(DashboardView dbObject, string theView)
|
||||||
{
|
{
|
||||||
//always only current user id
|
dbObject.View = theView;
|
||||||
inObj.UserId = UserId;
|
|
||||||
|
|
||||||
//Replace the db object with the PUT object
|
|
||||||
CopyObject.Copy(inObj, dbObject, "Id");
|
|
||||||
//Set "original" value of concurrency token to input token
|
|
||||||
//this will allow EF to check it out
|
|
||||||
ct.Entry(dbObject).OriginalValues["Concurrency"] = inObj.Concurrency;
|
|
||||||
|
|
||||||
Validate(dbObject, false);
|
Validate(dbObject, false);
|
||||||
if (HasErrors)
|
if (HasErrors)
|
||||||
return false;
|
return false;
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user