This commit is contained in:
@@ -191,15 +191,8 @@ namespace AyaNova.Biz
|
|||||||
//
|
//
|
||||||
internal async Task<WorkOrder> WorkOrderPutAsync(WorkOrder putObject)
|
internal async Task<WorkOrder> WorkOrderPutAsync(WorkOrder putObject)
|
||||||
{
|
{
|
||||||
|
//Note: this is intentionally not using the getasync because
|
||||||
//BUGBUG: put object has no children
|
//doing so would invoke the children which would then get deleted on save since putobject has no children
|
||||||
//this code replaces db object with put object and
|
|
||||||
//in doing so removes all children from db object
|
|
||||||
//potential solutions:
|
|
||||||
// go back to copy object
|
|
||||||
// don't fetch entire graph of dbObject (perhaps that prevents it getting affected)
|
|
||||||
//somehow ignore certain properties on update??
|
|
||||||
//WorkOrder dbObject = await WorkOrderGetAsync(putObject.Id, false);
|
|
||||||
WorkOrder dbObject = await ct.WorkOrder.AsNoTracking().FirstOrDefaultAsync(z=>z.Id==putObject.Id);
|
WorkOrder dbObject = await ct.WorkOrder.AsNoTracking().FirstOrDefaultAsync(z=>z.Id==putObject.Id);
|
||||||
if (dbObject == null)
|
if (dbObject == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user