public IResult Add(Shelf shelf) { var result = _shelfDal.GetAll(s => s.ShelfName == shelf.ShelfName); if (result.Count != 0) { return(new ErrorResult(Messages.ShelfAlreadyExist)); } _shelfDal.Add(shelf); return(new SuccessResult(Messages.AddedShelf)); }
public IResult Add(Shelf shelf) { _shelfDal.Add(shelf); return(new SuccessResult(Messages.ShelfAdded)); }