public async Task <List <MaterialTypeViewModel> > GetAllMaterialTypes() { var materialTypes = await materialTypeReadRepository.GetAllMaterials(); if (materialTypes == null || !materialTypes.Any()) { logger.Error(NoRecordsExists); throw new ResourceNotFoundException(NoRecordsExists); } return(materialTypes); }
protected virtual async Task <List <MaterialTypeViewModel> > GetAllMaterials() { return(await materialTypeReadRepository.GetAllMaterials()); }