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

            if (id.HasValue)
            {
                model = PeriodModel.ToModel(PeriodRepository.GetById(id.Value));
            }
            return(View(model));
        }
예제 #2
0
 public ActionResult Get(Guid id)
 {
     return(View(PeriodModel.ToModel(PeriodRepository.GetById(id))));
 }
예제 #3
0
 public ActionResult GetAll()
 {
     return(View(PeriodRepository.All().Select(p => PeriodModel.ToModel(p))));
 }