Inheritance: System.Data.Objects.DataClasses.EntityObject
Ejemplo n.º 1
0
 //Add a friendship
 public ActionResult Add(Guid UserId)
 {
     Friendship f = new Friendship();
     f.UserId = (Guid)currentUser.ProviderUserKey;
     f.FriendId = UserId;
     f.FriendshipId = System.Guid.NewGuid();
     friendshipRepo.Add(f);
     friendshipRepo.Save();
     return RedirectToAction("Index");
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Friendships EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFriendships(Friendship friendship)
 {
     base.AddObject("Friendships", friendship);
 }
Ejemplo n.º 3
0
 public void Add(Friendship f)
 {
     entities.Friendships.AddObject(f);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a new Friendship object.
 /// </summary>
 /// <param name="friendshipId">Initial value of the FriendshipId property.</param>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="friendId">Initial value of the FriendId property.</param>
 public static Friendship CreateFriendship(global::System.Guid friendshipId, global::System.Guid userId, global::System.Guid friendId)
 {
     Friendship friendship = new Friendship();
     friendship.FriendshipId = friendshipId;
     friendship.UserId = userId;
     friendship.FriendId = friendId;
     return friendship;
 }