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;
 }
Example #3
0
 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;
 }
Example #5
0
        public Principal()
        {
            InitializeComponent();
            _repo = Program.container.GetInstance <IItemRepo>();

            PreencherGrid();
        }
Example #6
0
 /// <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;
 }
Example #7
0
 public CartService(
     IHttpContextAccessor httpContextAccessor,
     IItemRepo itemRepo,
     IMapper mapper)
 {
     _httpContextAccessor = httpContextAccessor;
     _s        = _httpContextAccessor.HttpContext.Session;
     _itemRepo = itemRepo;
     _mapper   = mapper;
 }
Example #8
0
        public Supervisor(IMapper mapper, ICustomerRepo ICustomerRepo,
                          IItemRepo IItemRepo, IInvoiceRepo IInvoiceRepo,
                          IStoreRepo IStoreRepo)

        {
            _mapper        = mapper;
            _ICustomerRepo = ICustomerRepo;
            _IInvoiceRepo  = IInvoiceRepo;
            _IItemRepo     = IItemRepo;
            _IStoreRepo    = IStoreRepo;
        }
Example #9
0
 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;
 }
Example #10
0
 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>())
 {
 }
Example #14
0
 public HomeController()
 {
     _itemRepo = new ItemRepo(Items);
 }
Example #15
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="db">Entity framework database context</param>
 public EFExitItemDataRepo(
     EFWorldModuleContext db,
     IItemRepo itemRepo) : base(db, db.GetDbSet <ExitItemData>())
 {
 }
Example #16
0
 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);
 }
Example #18
0
 public InvoiceController(IStoreRepo store, IItemRepo item, IInvoiceRepo invoice)
 {
     this.store   = store;
     this.item    = item;
     this.invoice = invoice;
 }
Example #19
0
 public StockService(IItemRepo itemRepo)
 {
     _itemRepo = itemRepo;
 }
Example #20
0
 public StockService()
 {
     _itemRepo = new ItemRepo();
 }
Example #21
0
 public ItemController()
 {
     _itemRepo = new ItemRepo();
 }
Example #22
0
 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>())
 {
 }
Example #24
0
 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>())
 {
 }
Example #29
0
 public ItemBizLog(IItemRepo repo)
 {
     this.repo = repo;
 }
Example #30
0
 public ItemController(IItemRepo itemRepo)
 {
     _itemRepo = itemRepo;
 }
Example #31
0
 public ItemController(IItemRepo repo)
 {
     _repository = repo;
 }