public async Task <ActionResult <PagedList <ItemDto> > > Get([FromQuery] ItemQueryParameters itemQueryParameters = null) { itemQueryParameters ??= new ItemQueryParameters(); PagedList <Item> items = await _itemGroupRepository.Get(itemQueryParameters); HttpContext.Items.Add(nameof(PaginationMetadata), items.PaginationMetadata); HttpContext.Items.Add(nameof(QueryParameters), itemQueryParameters); return(Ok(items)); }
public ItemGroup GetItemGroupByName(string itemGroupName) { return(itemGroupRepository.Get(c => c.Name == itemGroupName)); }