Пример #1
0
 public IDataResult <Product> GetById(int Id)
 {
     try
     {
         return(new SuccessDataResult <Product>(productDataAccess.Get(p => p.Id == Id)));
     }
     catch (Exception ex)
     {
         return(new ErrorDataResult <Product>(null, ex.Message));
     }
 }