public ArenaController(ApplicationDbContext db,
                        UserManager <ApplicationUser> userManager,
                        IArenaService arenaService)
 {
     this._db           = db;
     this._userManager  = userManager;
     this._arenaService = arenaService;
 }
Пример #2
0
 public ArenasController(IMapper mapper,
                         IArenaService arenaService,
                         IOptions <PagingOptions> defaultPagingOptions,
                         LinkGenerator linkGenerator)
 {
     _mapper               = mapper;
     _arenaService         = arenaService;
     _defaultPagingOptions = defaultPagingOptions.Value;
     _linkGenerator        = linkGenerator;
 }
        public FightingQuery(IAccountService accountService, IArenaService arenaService)
        {
            Field <AccountGraphType>(
                "account",
                arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                resolve: context => accountService.GetById <long>(context.GetArgument <int>("id")));

            Field <ArenaGraphType>(
                "arena",
                arguments: new QueryArguments(new QueryArgument <IntGraphType> {
                Name = "id"
            }),
                resolve: context => arenaService.GetById <long>(context.GetArgument <int>("id")));
        }
 public AccountGraphType(IArenaService arenaService)
 {
     Field(x => x.Id);
     Field(x => x.FirstName);
     Field(x => x.LastName);
     Field(x => x.Address);
     Field(x => x.Bithday);
     Field(x => x.IsDeleted);
     Field(x => x.Role);
     Field(x => x.Email);
     Field <ListGraphType <ArenaGraphType> >("Arenas",
                                             arguments: new QueryArguments(new QueryArgument <IntGraphType> {
         Name = "id"
     }),
                                             resolve: context => arenaService.GetByAccountId(context.Source.Id), description: "");
 }
 public ArenaController(IArenaService arenaService)
 {
     _arenaService = arenaService;
 }
Пример #6
0
 public ArenaController(IArenaService service)
     : base(service)
 {
     _service = service;
 }
Пример #7
0
 public ArenaController(IArenaService arenaService, IArenaBattleService arenaBattleService)
 {
     this.arenaService       = arenaService;
     this.arenaBattleService = arenaBattleService;
 }