Beispiel #1
0
 public Role GetRole(int id)
 {
     using (var dbContext = new AccountDbContext())
     {
         return dbContext.Find<Role>(id);
     }
 }
Beispiel #2
0
 /// <summary>
 /// 查询单个对象
 /// </summary>
 public Menu GetMenu(int id)
 {
     using (var dbContext = new AccountDbContext())
     {
         return dbContext.Find<Menu>(id);
     }
 }