Exemple #1
0
        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));
        }
Exemple #2
0
 public IResult Add(Shelf shelf)
 {
     _shelfDal.Add(shelf);
     return(new SuccessResult(Messages.ShelfAdded));
 }