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); }
protected virtual async Task <MaterialTypeViewModel> GetMaterialById(int id) { return(await materialTypeReadRepository.GetMaterialTypeById(id)); }