public InventoryMutation(IItemRepo itemRepo) { FieldAsync <ItemType>( "createItem", arguments: new QueryArguments(new QueryArgument <NonNullGraphType <CreateItemInputType> > { Name = "createItem" }), resolve: async context => { var item = context.GetArgument <Item>("createItem"); return(await context.TryAsyncResolve(async c => (await itemRepo.Add(new List <Item> { item })).FirstOrDefault())); } ); FieldAsync <ItemType>( "updateItem", arguments: new QueryArguments(new QueryArgument <NonNullGraphType <UpdateItemInputType> > { Name = "updateItem" }), resolve: async context => { var item = context.GetArgument <Item>("updateItem"); return(await context.TryAsyncResolve(async c => (await itemRepo.Update(new List <Item> { item })).FirstOrDefault())); } ); }
public BakedController(ICustomerRepo customer, IItemRepo item, IOrderRepo order, IMapper mapper) { _customer = customer; _item = item; _order = order; _mapper = mapper; }
public ItemService(IMapper mapper, IItemRepo itemRepo, ILogger <ItemService> logger) { this.mapper = mapper; this.itemRepo = itemRepo; this.logger = logger; }
/// <summary> /// Constructor /// </summary> /// <param name="itemRepo"></param> /// <param name="scriptManager"></param> /// <param name="messageManager"></param> public ItemManager( IModuleManager moduleManager, IItemRepo itemDataRepo) { ModuleManager = moduleManager; ItemRepo = itemDataRepo; }
public Principal() { InitializeComponent(); _repo = Program.container.GetInstance <IItemRepo>(); PreencherGrid(); }
/// <summary> /// Initialize module /// </summary> /// <param name="repositories"></param> public void Initialize(List <ICrudModelRepository> repositories) { ItemRepo = repositories .Where(x => x is IItemRepo) .Select(x => (IItemRepo)x).FirstOrDefault(); ModuleManager.GetItemRepo().OnItemCreate += OnItemCreate; ModuleManager.GetItemRepo().OnItemRead += OnItemRead; ModuleManager.GetItemRepo().OnItemUpdate += OnItemUpdate; ModuleManager.GetItemRepo().OnItemDelete += OnItemDelete; }
public CartService( IHttpContextAccessor httpContextAccessor, IItemRepo itemRepo, IMapper mapper) { _httpContextAccessor = httpContextAccessor; _s = _httpContextAccessor.HttpContext.Session; _itemRepo = itemRepo; _mapper = mapper; }
public Supervisor(IMapper mapper, ICustomerRepo ICustomerRepo, IItemRepo IItemRepo, IInvoiceRepo IInvoiceRepo, IStoreRepo IStoreRepo) { _mapper = mapper; _ICustomerRepo = ICustomerRepo; _IInvoiceRepo = IInvoiceRepo; _IItemRepo = IItemRepo; _IStoreRepo = IStoreRepo; }
public UnitOfWork( AuctionDbContext dbContext, IBidRepo bidRepo, ICategoryRepo categoryRepo, IItemRepo itemRepo, IOrderRepo orderRepo, IPaymentRepo paymentRepo ) { _dbContext = dbContext; _bidRepo = bidRepo; _categoryRepo = categoryRepo; _itemRepo = itemRepo; _orderRepo = orderRepo; _paymentRepo = paymentRepo; }
public GameController( ApplicationDbContext context, ICharacterItemsRepo characterItemsRepo, IItemRepo itemsRepo, IRarityRepo rarityRepo, IDbContextHelper contextHelper, ICharacterHelper characterHelper, IWebHostEnvironment hostEnv) { _context = context; _characterItemsRepo = characterItemsRepo; _itemsRepo = itemsRepo; _rarityRepo = rarityRepo; _contextHelper = contextHelper; _characterHelper = characterHelper; _hostingEnv = hostEnv; }
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 void InitNonExistingRepo(bool createWithUnitOfWork = false) { if (RecordRepo == null || ItemRepo == null) { if (createWithUnitOfWork) { if (UowManager == null) { UowManager = new UnitOfWorkManager(); } RecordRepo = new RecordRepo(UowManager.UnitOfWork); ItemRepo = new ItemRepo(UowManager.UnitOfWork); AlertRepo = new AlertRepo(UowManager.UnitOfWork); } else { RecordRepo = new RecordRepo(); ItemRepo = new ItemRepo(); AlertRepo = new AlertRepo(); } } }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFGeneratorItemDataRepo( EFWorldModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <GeneratorItemData>()) { }
public HomeController() { _itemRepo = new ItemRepo(Items); }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFExitItemDataRepo( EFWorldModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <ExitItemData>()) { }
public ItemService(INotificador notificador, IItemRepo repository) : base(notificador) { _repository = repository; }
public ItemManager(UnitOfWorkManager uowMgr) { UowManager = uowMgr; ItemRepo = new ItemRepo(uowMgr.UnitOfWork); RecordRepo = new RecordRepo(uowMgr.UnitOfWork); }
public InvoiceController(IStoreRepo store, IItemRepo item, IInvoiceRepo invoice) { this.store = store; this.item = item; this.invoice = invoice; }
public StockService(IItemRepo itemRepo) { _itemRepo = itemRepo; }
public StockService() { _itemRepo = new ItemRepo(); }
public ItemController() { _itemRepo = new ItemRepo(); }
public StoreController(IStoreRepo store, IItemRepo item) { this.store = store; this.item = item; }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFCharacterItemDataRepo( EFWorldModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <CharacterItemData>()) { }
public HomeController(IItemRepo itemRepo) { _itemRepo = itemRepo; }
public ItemManager(IntegratieDbContext context) { ItemRepo = new ItemRepo(context); }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFLocationItemDataRepo( EFWorldModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <LocationItemData>()) { }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFPhysicalItemDataRepo( EFWorldModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <PhysicalItemData>()) { }
/// <summary> /// Constructor /// </summary> /// <param name="db">Entity framework database context</param> public EFJavascriptItemDataRepo( EFScriptModuleContext db, IItemRepo itemRepo) : base(db, db.GetDbSet <JavascriptItemData>()) { }
public ItemBizLog(IItemRepo repo) { this.repo = repo; }
public ItemController(IItemRepo itemRepo) { _itemRepo = itemRepo; }
public ItemController(IItemRepo repo) { _repository = repo; }