示例#1
0
        public async Task <ActionResult> CreateOrEdit(int?id)
        {
            if (!id.HasValue)
            {
                return(View(new StudentDto()));
            }
            var student = await _studentAppService.Get(id.Value);

            return(View(student));
        }
示例#2
0
        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));
        }