Example #1
0
        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));
        }
Example #2
0
 public ItemGroup GetItemGroupByName(string itemGroupName)
 {
     return(itemGroupRepository.Get(c => c.Name == itemGroupName));
 }