예제 #1
0
        public ActionResult AddOrUpdate(Guid?id)
        {
            var model = new TutorModel();

            if (id.HasValue)
            {
                model = TutorModel.ToModel(TutorRepository.GetById(id.Value));
            }
            return(View(model));
        }
예제 #2
0
        public ActionResult Get(Guid id)
        {
            var model = TutorModel.ToModel(TutorRepository.GetById(id));

            return(View(model));
        }
예제 #3
0
        public ActionResult GetAll()
        {
            var models = TutorRepository.All().Select(c => TutorModel.ToModel(c));

            return(View(models));
        }