コード例 #1
0
        public async Task <IActionResult> Create(EmploymentApplicationViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    _result = await _iEmploymentApplicationManager.InsertEmploymentApplicationAsync(model);

                    return(RedirectToAction(nameof(Index)));
                }
                return(View(model));
            }
            catch (Exception ex)
            {
                return(ErrorView(ex));
            }
        }
コード例 #2
0
        public async Task <IActionResult> Create([Bind("FirstName,LastName,DisplayName,EmailAddress,PhoneNumber,City,State,Country,ZipCode,IsArchived,IsDeleted,Id")] EmploymentApplicationViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    _result = await _iEmploymentApplicationManager.InsertEmploymentApplicationAsync(model);

                    return(RedirectToAction(nameof(Index)));
                }
                return(View(model));
            }
            catch (Exception ex)
            {
                return(ErrorView(ex));
            }
        }