public ActionResult Edit(view_Membership view_membership)
 {
     if (ModelState.IsValid)
     {
         db.view_Membership.Attach(view_membership);
         db.ObjectStateManager.ChangeObjectState(view_membership, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(view_membership);
 }
        public ActionResult Create(view_Membership view_membership)
        {
            if (ModelState.IsValid)
            {
                db.view_Membership.AddObject(view_membership);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(view_membership);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the view_Membership EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToview_Membership(view_Membership view_Membership)
 {
     base.AddObject("view_Membership", view_Membership);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new view_Membership object.
 /// </summary>
 /// <param name="userName">Initial value of the UserName property.</param>
 /// <param name="roleName">Initial value of the RoleName property.</param>
 /// <param name="lastActivityDate">Initial value of the LastActivityDate property.</param>
 public static view_Membership Createview_Membership(global::System.String userName, global::System.String roleName, global::System.DateTime lastActivityDate)
 {
     view_Membership view_Membership = new view_Membership();
     view_Membership.UserName = userName;
     view_Membership.RoleName = roleName;
     view_Membership.LastActivityDate = lastActivityDate;
     return view_Membership;
 }