public InventoryQuery(IItemRepo itemRepo) { Field <ListGraphType <ItemType> >( "items", //arguments: new ItemQueryArguments(), arguments: new QueryArguments(new QueryArgument <ItemSearchArgument>() { Name = "search" }), resolve: context => { //var a = ArgumentResolver.GetArgumentTyped<ItemQueryArguments>(context); var item = context.GetArgument <ItemSearchDTO>("search"); return(itemRepo.GetAll()); } ); //Field<ListGraphType<MovementType>>( // "movements", // resolve: context => itemRepo.GetAll() //); }
public IActionResult Get() { return(Ok(_repo.GetAll())); }
public ActionResult Index() { IList <Item> items = _itemRepo.GetAll(); return(View(items)); }
public ICollection <Item> GetAll() { return(itemRepo.GetAll()); }