public IEnumerable <ItemDto> GetAll() { return(_itemRepository.GetAll() .Select(i => ItemDto.FromDbItem(i)) .OrderBy(i => i.Name)); }
public ItemDto GetById(int id) { var dbItem = _itemRepository.Get(id); return(dbItem == null ? null : ItemDto.FromDbItem(dbItem)); }