public async Task <ActionResult> CreateOrEdit(int?id) { if (!id.HasValue) { return(View(new StudentDto())); } var student = await _studentAppService.Get(id.Value); return(View(student)); }
public async Task <ActionResult> Edit(int studentId) { var student = await _studentAppService.Get(new EntityDto <int>(studentId)); var model = new Edit { Student = student, Status = student.Status }; return(View("Edit", model)); }