public ActionResult Index(LogListVM vm) { using (tblLogRepository rep = new tblLogRepository()) { vm.logs = rep.get(vm.StartDate, vm.EndDate, vm.Status); } return(View(vm)); }