public static TermYearViewModel MapTermYearViewModel(TermYear termYear) { var model = new TermYearViewModel { id = termYear.Id, active = termYear.Active, title = termYear.Title, year = termYear.Year }; return(model); }
public IActionResult Create() { var activeTermYear = termService.GetActiveTermYear(); var termYear = new TermYearViewModel { year = activeTermYear.Year + 1 }; var model = new TermYearEditForm { year = termYear }; return(Ok(model)); }