public ActionResult Create(FootballAssociation footballassociation) { if (ModelState.IsValid) { db.FootballAssociations.AddObject(footballassociation); db.SaveChanges(); return PartialView("GridData", new FootballAssociation[] { footballassociation }); } return PartialView("Edit", footballassociation); }
/// <summary> /// Deprecated Method for adding a new object to the FootballAssociations EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToFootballAssociations(FootballAssociation footballAssociation) { base.AddObject("FootballAssociations", footballAssociation); }
/// <summary> /// Create a new FootballAssociation object. /// </summary> /// <param name="associationID">Initial value of the AssociationID property.</param> /// <param name="name">Initial value of the Name property.</param> public static FootballAssociation CreateFootballAssociation(global::System.Int32 associationID, global::System.String name) { FootballAssociation footballAssociation = new FootballAssociation(); footballAssociation.AssociationID = associationID; footballAssociation.Name = name; return footballAssociation; }
public ActionResult Edit(FootballAssociation footballassociation) { if (ModelState.IsValid) { db.FootballAssociations.Attach(footballassociation); db.ObjectStateManager.ChangeObjectState(footballassociation, EntityState.Modified); db.SaveChanges(); return PartialView("GridData", new FootballAssociation[] { footballassociation }); } return PartialView(footballassociation); }