aboutsummaryrefslogtreecommitdiff
path: root/Database/Database.cs
diff options
context:
space:
mode:
authorAryadev Chavali <aryadevchavali1@gmail.com>2019-02-08 10:54:53 +0000
committerAryadev Chavali <aryadevchavali1@gmail.com>2019-02-08 10:54:53 +0000
commit7bc6af15824076cdc834e3f873e3debbc7414c9b (patch)
treea41415c6172bd2055c1705d4e44dc44860b8606f /Database/Database.cs
parent7ef186429d1b14196304c790181c935639a1baa8 (diff)
downloadnewsaggregator-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.cs6
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");