component storage full
This commit is contained in:
parent
10092dcda3
commit
0732cc0ede
@ -48,8 +48,7 @@ namespace JewelryStoreFileImplement.Implements
|
||||
}
|
||||
public ComponentViewModel? Insert(ComponentBindingModel model)
|
||||
{
|
||||
model.Id = _source.Components.Count > 0 ? _source.Components.Max(x =>
|
||||
x.Id) + 1 : 1;
|
||||
model.Id = _source.Components.Count > 0 ? _source.Components.Max(x =>x.Id) + 1 : 1;
|
||||
var newComponent = Component.Create(model);
|
||||
if (newComponent == null)
|
||||
{
|
||||
@ -62,8 +61,7 @@ x.Id) + 1 : 1;
|
||||
|
||||
public ComponentViewModel? Update(ComponentBindingModel model)
|
||||
{
|
||||
var component = _source.Components.FirstOrDefault(x => x.Id ==
|
||||
model.Id);
|
||||
var component = _source.Components.FirstOrDefault(x => x.Id ==model.Id);
|
||||
if (component == null)
|
||||
{
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user