merge
This commit is contained in:
commit
42ebe7410b
@ -43,6 +43,8 @@ namespace LawFirmDatabaseImplement.Implements
|
||||
return context.Orders
|
||||
.Include(x => x.Client)
|
||||
.Include(x => x.Implementer)
|
||||
.Include(x => x.Document)
|
||||
.Include(x => x.Client)
|
||||
.Where(x => x.ClientId == model.ClientId)
|
||||
.Select(x => x.GetViewModel)
|
||||
.ToList();
|
||||
@ -80,7 +82,7 @@ namespace LawFirmDatabaseImplement.Implements
|
||||
using var context = new LawFirmDatabase();
|
||||
context.Orders.Add(newOrder);
|
||||
context.SaveChanges();
|
||||
return context.Orders.Include(x => x.Document).FirstOrDefault(x => x.Id == newOrder.Id)?.GetViewModel;
|
||||
return context.Orders.Include(x => x.Document).Include(x => x.Client).FirstOrDefault(x => x.Id == newOrder.Id)?.GetViewModel;
|
||||
}
|
||||
|
||||
public OrderViewModel? Update(OrderBindingModel model)
|
||||
|
@ -67,7 +67,6 @@ namespace LawFirmDatabaseImplement.Models
|
||||
public OrderViewModel GetViewModel {
|
||||
get
|
||||
{
|
||||
var context = new LawFirmDatabase();
|
||||
return new ()
|
||||
{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user