コード例 #1
0
        public async Task <IActionResult> AddPersonAsync(AddPersonRequest addPersonRequest)
        {
            await _personsRepo.AddAsync(addPersonRequest.ToPerson());

            return(Ok());
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("Id,PersonnelNumber,LastName,FirstName,MiddleName,DateOfBirth,PassportDetails,Education,DateOfEmployment,Phone,Email,Post")] Persons person)
        {
            await _persons.AddAsync(person);

            return(PartialView("Create", person));
        }