public NewsController(UserManager <User> userManager, SignInManager <User> signInManager, RoleManager <IdentityRole> roleManager, NewsSiteContext context)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.roleManager   = roleManager;
     this.context       = context;
 }
 /// <summary>
 /// Создаёт экземпляр FullDBManager и инициализирует объект контекста на основе опций из appsettings.json.
 /// </summary>
 public FullDBManager(string connectionString = "")
 {
     if (string.IsNullOrWhiteSpace(connectionString))
     {
         _context = new NewsSiteContext(GetDbContextOptions());
     }
     else
     {
         _context = new NewsSiteContext(GetDbContextOptions(connectionString));
     }
 }
Exemple #3
0
 /// <summary>
 /// Создаёт экземпляр FullDBManager и инициализирует объект контекста на основе опций из appsettings.json.
 /// </summary>
 public SimplifiedDBManager()
 {
     _context = new NewsSiteContext(GetDbContextOptions());
 }
 internal FullDataBaseService(NewsSiteContext context)
 {
     _context = context;
 }
Exemple #5
0
 public RssFeedRepository(NewsSiteContext context)
 {
     _newsSiteContext = context;
 }
Exemple #6
0
 public HomeController(UserManager <User> userManager, SignInManager <User> signInManager, NewsSiteContext context)
 {
     this.userManager   = userManager;
     this.signInManager = signInManager;
     this.context       = context;
 }
Exemple #7
0
 public HomeController(NewsSiteContext context)
 {
     _context = context;
 }