public async Task <ICollection <Models.Menu> > GetChildMenus(int parentId)
 {
     using (var context = new BluegrassContext(_options))
     {
         return(await context.Menu.Where(x => x.ParentId == parentId).ToListAsync());
     }
 }
 public UserRepository(BluegrassContext context) : base(context)
 {
 }
 public MenuRepository(BluegrassContext context, DbContextOptions <BluegrassContext> options) : base(context)
 {
     _options = options;
 }
Exemple #4
0
 public GenericRepository(BluegrassContext dbContext)
 {
     _dbContext = dbContext;
 }