public async Task <BaseResult> CreateOrUpdate(ProductCategoryModel model, int updateBy = 0, string updateByUserName = "") { var productCategory = model.ToProductCategory(); productCategory = productCategory.UpdateCommonInt(updateBy, updateByUserName); if (productCategory.Id > 0) { return(await Update(productCategory)); } else { return(await Create(productCategory)); } }
public async Task <int> Update(ProductCategoryModel model) { return(await _service.Update(model.ToProductCategory())); }