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