public void AddFollowConnection(string loggedInUser,string username)
        {
            FollowConnection conn = new FollowConnection();

            conn.FollowingName = username;
            conn.Username = loggedInUser;
            db.FollowConnections.InsertOnSubmit(conn);
            db.SubmitChanges();
        }
        public ActionResult Unfollow(FollowConnection deleteMe)
        {
            DataRepository helper = new DataRepository();
            helper.deleteConnection(deleteMe);

            return RedirectToAction("Index");
        }
Ejemplo n.º 3
0
		private void detach_FollowConnections(FollowConnection entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Ejemplo n.º 4
0
 partial void DeleteFollowConnection(FollowConnection instance);
Ejemplo n.º 5
0
 partial void UpdateFollowConnection(FollowConnection instance);
Ejemplo n.º 6
0
 partial void InsertFollowConnection(FollowConnection instance);
 public void FollowSelf(string username)
 {
     FollowConnection conn = new FollowConnection();
     conn.FollowingName = username;
     conn.Username = username;
     db.FollowConnections.InsertOnSubmit(conn);
     db.SubmitChanges();
 }
        public void deleteConnection(FollowConnection deleteMe)
        {
            FollowConnection delete = db.FollowConnections.FirstOrDefault(x=>x.Id == deleteMe.Id);

            db.FollowConnections.DeleteOnSubmit(delete);
            db.SubmitChanges();
        }