Пример #1
0
        public bool Delete(int?id)
        {
            int rowAffected = _Repository.Delete(id);

            bool isDeleted = rowAffected > 0;

            return(isDeleted);
        }
        public bool Delete(ProductModel productModel)
        {
            int rowAffected = _productModelRepository.Delete(productModel);

            bool isSaved = rowAffected > 0;

            return(isSaved);
        }
Пример #3
0
        public ActionResult Delete(string id)
        {
            try
            {
                using (var unit = GetUnitOfWork())
                {
                    var repo = new ProductModelRepository(unit, _defaultVendorID);
                    repo.Delete(id);
                }

                return(Success("Successfully removed type"));
            }
            catch (Exception e)
            {
                return(Failure("Something went wrong ", e));
            }
        }