public async Task <ServiceResult> UpdateLibrary(MaterialTypeViewModel entity) { var isUpdated = await materialTypeWriteRepository.UpdateMaterialType(entity); ServiceResult result = new ServiceResult(); if (!isUpdated) { result.SetFailure("Error while material library."); } else { result.SetSuccess("Material updated successfully."); } return(result); }
protected virtual async Task <bool> UpdateMaterialType(MaterialTypeViewModel entity) { return(await materialTypeWriteRepository.UpdateMaterialType(entity)); }