Пример #1
0
        public async Task <ActionResult> Create_registration([Bind] RegistrationModel Registration)
        {
            try
            {
                // TODO: Add insert logic here
                if (ModelState.IsValid)
                {
                    await _iregistrationService.AddRegistration(Registration);

                    return(RedirectToAction("Index", "Registration"));
                }
                return(View(_iregistrationService));
            }
            catch
            {
                return(View());
            }
        }
 public async Task <IActionResult> AddRegistration(AddRegistrationDTO newRegistration)
 {
     return(Ok(await _registrationService.AddRegistration(newRegistration)));
 }