Exemplo n.º 1
0
        private async Task Init()
        {
            Mapper         = CreateMapper();
            RankDb         = new RankingDb();
            GamesDb        = new GamesDb();
            VideosDb       = new VideosDb();
            PlaysDb        = new PlaysDb();
            _httpClient    = new HttpClient();
            _bggApiClient  = new BoardGameGeekXmlApi2Client(_httpClient);
            _unofficialBgg = new UnofficialBggClient(_httpClient, _bggApiClient);

            if (!string.IsNullOrEmpty(await Username()))
            {
                var c = new BggCredentials()
                {
                    Username  = await Username(),
                    Password  = await Password(),
                    SessionId = await Session()
                };

                _unofficialBgg.Credentials = c;
            }
        }
Exemplo n.º 2
0
 // GET: api/Videos
 public VideosController()
 {
     _db = new VideosDb();
     _db.Configuration.ProxyCreationEnabled = false;
 }