public ActionResult Create(Application application)
        {
            if (ModelState.IsValid)
            {

                db.Applications.AddObject(application);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ApplicationStatusID = new SelectList(db.ApplicationStatus1, "AppStatusID", "ApplicationStatusName", application.ApplicationStatusID);
            ViewBag.ApplicationAssignedID = new SelectList(db.AssignedToes, "AssignedID", "AssignedName", application.ApplicationAssignedID);
            ViewBag.ApplicationApplicantID = new SelectList(db.JobApplicants, "ApplicantID", "ApplicantLastName", application.ApplicationApplicantID);
            ViewBag.ApplicationJobID = new SelectList(db.JobPosts, "JobID", "JobName", application.ApplicationJobID);
            return View(application);
        }
 /// <summary>
 /// Create a new Application object.
 /// </summary>
 /// <param name="applicationID">Initial value of the ApplicationID property.</param>
 /// <param name="applicationApplicantID">Initial value of the ApplicationApplicantID property.</param>
 /// <param name="applicationJobID">Initial value of the ApplicationJobID property.</param>
 public static Application CreateApplication(global::System.Int32 applicationID, global::System.Int32 applicationApplicantID, global::System.Int32 applicationJobID)
 {
     Application application = new Application();
     application.ApplicationID = applicationID;
     application.ApplicationApplicantID = applicationApplicantID;
     application.ApplicationJobID = applicationJobID;
     return application;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Applications EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToApplications(Application application)
 {
     base.AddObject("Applications", application);
 }
 public ActionResult Edit(Application application)
 {
     if (ModelState.IsValid)
     {
         db.Applications.Attach(application);
         db.ObjectStateManager.ChangeObjectState(application, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ApplicationStatusID = new SelectList(db.ApplicationStatus1, "AppStatusID", "ApplicationStatusName", application.ApplicationStatusID);
     ViewBag.ApplicationAssignedID = new SelectList(db.AssignedToes, "AssignedID", "AssignedName", application.ApplicationAssignedID);
     ViewBag.ApplicationApplicantID = new SelectList(db.JobApplicants, "ApplicantID", "ApplicantLastName", application.ApplicationApplicantID);
     ViewBag.ApplicationJobID = new SelectList(db.JobPosts, "JobID", "JobName", application.ApplicationJobID);
     return View(application);
 }