From 7bc6af15824076cdc834e3f873e3debbc7414c9b Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Fri, 8 Feb 2019 10:54:53 +0000 Subject: Changed name of class and made Details object based --- Database/Database.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Database') diff --git a/Database/Database.cs b/Database/Database.cs index 9cd2939..466c304 100644 --- a/Database/Database.cs +++ b/Database/Database.cs @@ -10,13 +10,13 @@ using MySql.Data.EntityFrameworkCore; using Classes; namespace Database { - public class Database : DbContext { - public Database() { + public class DatabaseContext : DbContext { + public DatabaseContext() { Details = Task.Run(async () => await DetailsHelper.GetDetails()).GetAwaiter().GetResult(); } public DbSet
Articles; public DbSet Configs; - public static Dictionary Details; + public Dictionary Details; protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseMySQL($"server=localhost;uid={Details["username"]};password={Details["password"]};database=news_aggregator"); -- cgit v1.2.3-13-gbd6f