// GET: Calendar/Edit/5 public ActionResult Edit(int id) { Calendar editCalendar = null; using (SqlUnitOfWork unitOfWork = new SqlUnitOfWork("gp")) { CalendarRepository calendarRepo = new CalendarRepository(unitOfWork); editCalendar = calendarRepo.Get(id); unitOfWork.Commit(); } return(View(editCalendar)); }
public static IEnumerable <Calendar> Get() { var repository = new CalendarRepository(); return(repository.Get()); }