fixes
This commit is contained in:
parent
a66d12738d
commit
b1c29923a5
@ -23,6 +23,7 @@ namespace ShipyardDataBaseImplement.Implements
|
||||
{
|
||||
var deletedElement = context.Orders
|
||||
.Include(x => x.Ship)
|
||||
.Include(x => x.Client)
|
||||
.FirstOrDefault(x => x.Id == model.Id)
|
||||
?.GetViewModel;
|
||||
context.Orders.Remove(element);
|
||||
|
@ -62,7 +62,7 @@ namespace ShipyardFileImplement.Implements
|
||||
|
||||
public ClientViewModel? Insert(ClientBindingModel model)
|
||||
{
|
||||
model.Id = source.Clients.Count > 0 ? source.Ships.Max(x => x.Id) + 1 : 1;
|
||||
model.Id = source.Clients.Count > 0 ? source.Clients.Max(x => x.Id) + 1 : 1;
|
||||
var newClient = Client.Create(model);
|
||||
if (newClient == null)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user