public ActionResult HandlePost(Models.ContactEntry model) { if (!ModelState.IsValid) { return(CurrentUmbracoPage()); } //add to db model.Created = DateTime.Now; var db = ApplicationContext.DatabaseContext.Database; db.Insert(model); //send email, do other things... TempData["Success"] = true; return(RedirectToCurrentUmbracoPage()); }
public ContactEntry(Models.ContactEntry contactEntry) { Id = contactEntry.Id; Type = (int)contactEntry.Type; Value = contactEntry.Value; }