Уборка лишнего
This commit is contained in:
parent
1160862303
commit
4e6b34a77d
@ -44,7 +44,7 @@ namespace HardwareShopDatabaseImplement.Models.Storekeeper
|
||||
}
|
||||
}
|
||||
|
||||
public static Component? Create(HardwareShopDatabase context, ComponentBindingModel model)
|
||||
public static Component? Create(ComponentBindingModel model)
|
||||
{
|
||||
if (model == null)
|
||||
{
|
||||
@ -55,12 +55,7 @@ namespace HardwareShopDatabaseImplement.Models.Storekeeper
|
||||
Id = model.Id,
|
||||
ComponentName = model.ComponentName,
|
||||
Cost = model.Cost,
|
||||
UserId = model.UserId,
|
||||
Builds = model.ComponentsBuilds.Select(x => new ComponentBuild
|
||||
{
|
||||
Build = context.Builds.First(y => y.Id == x.Key),
|
||||
Count = x.Value.Item2
|
||||
}).ToList()
|
||||
UserId = model.UserId
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user