Esempio n. 1
0
 private void InitializeDbContext(IServiceProvider serviceProvider)
 {
     _context = serviceProvider.GetService <AnnouncementsContext>();
     if (_context != null)
     {
         Announcements = new AnnouncementsRepository(_context);
         Categories    = new CategoriesRepository(_context);
         Users         = new UserRepository(_context);
     }
 }
Esempio n. 2
0
 public CategoriesRepository(AnnouncementsContext context)
     : base(context)
 {
 }
 public AnnouncementsRepository(AnnouncementsContext context)
     : base(context)
 {
 }