public async Task <IActionResult> SubmitContactForm([Bind("ContactFormId,Name,UserEmailAddress,Subject,MessageBody")] ContactForm contactForm)
        {
            if (ModelState.IsValid)
            {
                bool success = await contactForm.Submit(_context.SystemConfigs.OrderBy(sc => sc.SystemConfigId).Last(), _logger);

                if (success)
                {
                    await _context.SaveChangesAsync();
                }
            }

            return(RedirectToAction("Index"));
        }
Example #2
0
 public void SubmitTest()
 {
     _contactForm.Submit(Contact.DEFAULT_CONTACT);
     CheckResult(Contact.DEFAULT_CONTACT.ToString());
 }