/// <summary> /// 判断是否存在 by some where /// </summary> /// <param name="where"></param> /// <returns></returns> public virtual bool Exists(Expression <Func <T, bool> > where) { using (var dbContext = new DcContext()) { return(dbContext.Set <T>().Any(where)); } }
public ModelingController(DcContext context) { _context = context; }
public HomeController(DcContext context, ILogger <HomeController> logger) { _logger = logger; _context = context; }