public async Task <IActionResult> Create(CreateViewModel createVM) { if (!ModelState.IsValid) { return(View(createVM)); } else { var captchaResponce = await _reCaptcha.Validate(Request.Form); if (!captchaResponce.Success) { ModelState.AddModelError("reCaptchaError", "reCAPTCHA error occured. Please try again."); return(View(createVM)); } } var advert = _createAdvert.CreateAdvert(createVM.Content, createVM.Image, new Guid("58222fde-d3f2-4eb3-997f-08d6f101052e")); _operationDb.AddAdvert(advert); return(RedirectToAction("Index")); }