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)); }
public int Add(ProductInfo model) { model.Id = KeyGenerator.Instance.GetNextValue("Product"); return(_dataAccess.Add(model)); }
public async Task <CommonResponseModel> Add(ProductModel item) { return(await productDataAccess.Add(item)); }