コード例 #1
0
 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;
 }
コード例 #3
0
        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")));
        }
コード例 #4
0
 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: "");
 }
コード例 #5
0
 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;
 }