Exemple #1
0
        public async Task <ServiceResult> RemoveLibrary(int id)
        {
            var isUpdated = await materialTypeWriteRepository.RemoveMaterialType(id);

            ServiceResult result = new ServiceResult();

            if (!isUpdated)
            {
                result.SetFailure("Error while deleting material.");
            }
            else
            {
                result.SetSuccess("Library deleted successfully.");
            }
            return(result);
        }
Exemple #2
0
 protected virtual async Task <bool> RemoveMaterialType(int id)
 {
     return(await materialTypeWriteRepository.RemoveMaterialType(id));
 }