public ActionResult AddOrUpdate(Guid?id) { var model = new TutorModel(); if (id.HasValue) { model = TutorModel.ToModel(TutorRepository.GetById(id.Value)); } return(View(model)); }
public ActionResult Get(Guid id) { var model = TutorModel.ToModel(TutorRepository.GetById(id)); return(View(model)); }
public ActionResult GetAll() { var models = TutorRepository.All().Select(c => TutorModel.ToModel(c)); return(View(models)); }