commit
This commit is contained in:
parent
9c61562368
commit
cd21f23715
@ -4,8 +4,6 @@
|
|||||||
{
|
{
|
||||||
public int? Id { get; set; }
|
public int? Id { get; set; }
|
||||||
|
|
||||||
public int? PurchaseId { get; set; }
|
|
||||||
|
|
||||||
public string? BuildName { get; set; } = string.Empty;
|
public string? BuildName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public int? UserId { get; set; }
|
public int? UserId { get; set; }
|
||||||
|
@ -53,14 +53,13 @@ namespace HardwareShopDatabaseImplement.Implements.Worker
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
using var context = new HardwareShopDatabase();
|
using var context = new HardwareShopDatabase();
|
||||||
var dadada = context.Builds
|
var result = context.Builds
|
||||||
.Include(x => x.Purchases)
|
.Include(x => x.Purchases)
|
||||||
.ThenInclude(x => x.Purchase)
|
.ThenInclude(x => x.Purchase)
|
||||||
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.BuildName) && x.BuildName == model.BuildName) ||
|
.FirstOrDefault(x => (!string.IsNullOrEmpty(model.BuildName) && x.BuildName == model.BuildName) ||
|
||||||
(model.Id.HasValue && x.Id == model.Id))
|
(model.Id.HasValue && x.Id == model.Id))
|
||||||
?.GetViewModel;
|
?.GetViewModel;
|
||||||
return dadada;
|
return result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BuildViewModel? Insert(BuildBindingModel model)
|
public BuildViewModel? Insert(BuildBindingModel model)
|
||||||
|
Loading…
Reference in New Issue
Block a user