Пример #1
0
        public async Task <MaterialTypeViewModel> GetMaterialTypeById(int id)
        {
            var materialType = await materialTypeReadRepository.GetMaterialTypeById(id);

            if (materialType == null)
            {
                logger.Error(NoRecordsExists);
                throw new ResourceNotFoundException(NoRecordsExists);
            }
            return(materialType);
        }
Пример #2
0
 protected virtual async Task <MaterialTypeViewModel> GetMaterialById(int id)
 {
     return(await materialTypeReadRepository.GetMaterialTypeById(id));
 }