diff options
author | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-08 10:54:53 +0000 |
---|---|---|
committer | Aryadev Chavali <aryadevchavali1@gmail.com> | 2019-02-08 10:54:53 +0000 |
commit | 7bc6af15824076cdc834e3f873e3debbc7414c9b (patch) | |
tree | a41415c6172bd2055c1705d4e44dc44860b8606f /Database/Database.cs | |
parent | 7ef186429d1b14196304c790181c935639a1baa8 (diff) | |
download | newsaggregator-7bc6af15824076cdc834e3f873e3debbc7414c9b.tar.gz newsaggregator-7bc6af15824076cdc834e3f873e3debbc7414c9b.tar.bz2 newsaggregator-7bc6af15824076cdc834e3f873e3debbc7414c9b.zip |
Changed name of class and made Details object based
Diffstat (limited to 'Database/Database.cs')
-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");
|