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