public bool Update(ProductModel obj) { int rowAffected = _Repository.Update(obj); bool isUpdated = rowAffected > 0; return(isUpdated); }
public ActionResult Update(string _ModelCode, string Translation) { try { using (var unit = GetUnitOfWork()) { var repo = new ProductModelRepository(unit, _defaultVendorID); repo.Update(_ModelCode, Translation); } return(Success("Successfully added type")); } catch (Exception e) { return(Failure("Something went wrong ", e)); } }