Exemple #1
0
 public IResult Add(Product product)
 {
     try
     {
         productDataAccess.Add(product);
     }
     catch (Exception ex)
     {
         var builder = new StringBuilder();
         return(new ErrorResult(false, builder.Append(ex.Message).Append(ex.InnerException.Message).ToString()));
     }
     return(new SuccessResult(Messages.ProductAdded));
 }
Exemple #2
0
 public int Add(ProductInfo model)
 {
     model.Id = KeyGenerator.Instance.GetNextValue("Product");
     return(_dataAccess.Add(model));
 }
Exemple #3
0
 public async Task <CommonResponseModel> Add(ProductModel item)
 {
     return(await productDataAccess.Add(item));
 }