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