diff options
Diffstat (limited to 'Database')
-rw-r--r-- | Database/Database.cs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Article> Articles;
public DbSet<Config> Configs;
- public static Dictionary<string, string> Details;
+ public Dictionary<string, string> Details;
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) {
optionsBuilder.UseMySQL($"server=localhost;uid={Details["username"]};password={Details["password"]};database=news_aggregator");
|