public ActionResult Create(CalendarDateViewModel createdDate) { if (ModelState.IsValid) { M_CalendarDate m_CalendarDate = createdDate.GetModel() as M_CalendarDate; _repositoriyCalendar.Create(m_CalendarDate); return(RedirectToAction("Index")); } return(View(createdDate)); }
public ActionResult Edit(CalendarDateViewModel editableDateVM) { M_CalendarDate editableDate = editableDateVM.GetModel() as M_CalendarDate; if (ModelState.IsValid) { _repositoriyCalendar.Update(editableDate); return(RedirectToAction("Index")); } return(View(editableDateVM)); }