Осталось привязать к вируалке
This commit is contained in:
parent
681a92d13f
commit
c66fb80196
@ -93,7 +93,7 @@ namespace PersonnelDepartmentDatabaseImplement.Implements
|
|||||||
using var context = new PersonnelDepartmentDatabase();
|
using var context = new PersonnelDepartmentDatabase();
|
||||||
context.Deals.Add(newElement);
|
context.Deals.Add(newElement);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
return newElement.GetViewModel;
|
return GetElement(new DealSearchModel { Id = newElement.Id } );
|
||||||
}
|
}
|
||||||
|
|
||||||
public DealViewModel? Update(DealBindingModel model)
|
public DealViewModel? Update(DealBindingModel model)
|
||||||
@ -111,7 +111,7 @@ namespace PersonnelDepartmentDatabaseImplement.Implements
|
|||||||
}
|
}
|
||||||
element.Update(model);
|
element.Update(model);
|
||||||
context.SaveChanges();
|
context.SaveChanges();
|
||||||
return element.GetViewModel;
|
return GetElement(new DealSearchModel { Id = element.Id });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user