コード例 #1
0
        public void AddFollowConnection(string loggedInUser,string username)
        {
            FollowConnection conn = new FollowConnection();

            conn.FollowingName = username;
            conn.Username = loggedInUser;
            db.FollowConnections.InsertOnSubmit(conn);
            db.SubmitChanges();
        }
コード例 #2
0
        public ActionResult Unfollow(FollowConnection deleteMe)
        {
            DataRepository helper = new DataRepository();
            helper.deleteConnection(deleteMe);

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

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