Пример #1
0
        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);
        }
Пример #2
0
 protected virtual async Task <List <MaterialTypeViewModel> > GetAllMaterials()
 {
     return(await materialTypeReadRepository.GetAllMaterials());
 }