public IActionResult Index() { var sql = $@"select * from election where end_date>='1999-11-14';"; var election = _context.Set <Election>().FromSql(sql).ToList(); return(View(election)); }
public GenericRepository(ElectionContext context) { _context = context; _dbSet = context.Set <T>(); }