This commit is contained in:
@@ -72,20 +72,11 @@ namespace AyaNova.Biz
|
||||
//put
|
||||
internal async Task<bool> PutAsync(DashboardView dbObject, string theView)
|
||||
{
|
||||
//always only current user id
|
||||
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;
|
||||
|
||||
dbObject.View = theView;
|
||||
Validate(dbObject, false);
|
||||
if (HasErrors)
|
||||
return false;
|
||||
await ct.SaveChangesAsync();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user