public ActionResult Create([Bind(Include = "date")] ReportingViewModel reportingView) { if (ModelState.IsValid) { //var reportings = from skill in db.Skills // join gskill in db.GraphSkill on skill.id equals gskill.related_skill // join gskillv in db.GraphSkillVacancy on gskill.id equals gskillv.graph_skill_id // join vacancy in db.Vacancies on gskillv.vacancy_id equals vacancy.id // where vacancy.created_at == reportingView.date // select new { skill = skill.title, date = vacancy.created_at.Value, count = vacancy.link.Count() }; ////ViewBag.Count = reportings.ToList().Count(); ////List<Reporting> repsToAdd = reportings.ToList(); //var lst=reportings.ToList().Select(r => new Reporting { skill = r.skill, date = r.date, count = r.count }).ToList(); repo.reportingUpdate(reportingView.date); //db.Reporting.Add(reporting); //db.SaveChanges(); return(RedirectToAction("Index")); } //return View(reporting); return(View()); }