public ActionResult Index(VEventApplication model) { if (!ModelState.IsValid) { return View(model); } var app = new DEventApplication(); app.Id = Guid.NewGuid(); app.Created = app.Updated = DateTime.UtcNow; app.FullName = model.FullName ?? ""; app.Email = model.Email ?? ""; app.Phone = model.Phone ?? ""; app.Comment = model.Comment ?? ""; app.Company = model.Company ?? ""; _ctx.DEventApplications.AddObject(app); _ctx.SaveChanges(); return View("RegisterComplete", model); }
/// <summary> /// Deprecated Method for adding a new object to the DEventApplications EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToDEventApplications(DEventApplication dEventApplication) { base.AddObject("DEventApplications", dEventApplication); }
/// <summary> /// Create a new DEventApplication object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="eventId">Initial value of the EventId property.</param> /// <param name="created">Initial value of the Created property.</param> /// <param name="updated">Initial value of the Updated property.</param> /// <param name="fullName">Initial value of the FullName property.</param> /// <param name="email">Initial value of the Email property.</param> /// <param name="company">Initial value of the Company property.</param> /// <param name="phone">Initial value of the Phone property.</param> /// <param name="comment">Initial value of the Comment property.</param> public static DEventApplication CreateDEventApplication(global::System.Guid id, global::System.Guid eventId, global::System.DateTime created, global::System.DateTime updated, global::System.String fullName, global::System.String email, global::System.String company, global::System.String phone, global::System.String comment) { DEventApplication dEventApplication = new DEventApplication(); dEventApplication.Id = id; dEventApplication.EventId = eventId; dEventApplication.Created = created; dEventApplication.Updated = updated; dEventApplication.FullName = fullName; dEventApplication.Email = email; dEventApplication.Company = company; dEventApplication.Phone = phone; dEventApplication.Comment = comment; return dEventApplication; }