public int AddItem(Item item) { if (itemDataAccess.HasThisId(item.Id)) { return(-1); } else if (itemDataAccess.HasThisName(item.Name)) { return(-2); } else { return(itemDataAccess.AddItem(item)); } }
public int AddItem(Item item) { return(itemtDataAccess.AddItem(item)); }