Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NewsApiClient"/> class.
 /// </summary>
 /// <param name="skipDetails">if set to <c>true</c> [skip details].</param>
 /// <param name="startDate">The start date.</param>
 public NewsApiClient(bool skipDetails, DateTime startDate)
 {
     config           = NewsConfiguration.Load();
     this.skipDetails = skipDetails;
     StartDate        = startDate.
                        ToUniversalTime().ToUnixTime();
 }
Exemplo n.º 2
0
        public NewsDbContext CreateDbContext(string[] args)
        {
            NewsConfiguration config = NewsConfiguration.Load();

            var optionsBuilder = new DbContextOptionsBuilder <NewsDbContext>();

            optionsBuilder.UseSqlServer(config.GetDefaultConnection().Value);

            return(new NewsDbContext(optionsBuilder.Options));
        }
Exemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the<see cref="NewsApiClient" /> class.
 /// </summary>
 public NewsApiClient()
 {
     config = NewsConfiguration.Load();
 }
Exemplo n.º 4
0
 public CryptoRepository()
 {
     config = NewsConfiguration.Load();
 }