Пример #1
0
        public IActionResult AddFollowing(int followingId)
        {
            using (var context = new RevojiDataContext())
            {
                DBFollowing dbFollowing = new DBFollowing();
                dbFollowing.FollowingAppUserId = followingId;
                dbFollowing.FollowerAppUserId  = ApiUser.ID;

                context.Add(dbFollowing);
                context.Save();

                return(Ok(new AppUserFollowing(dbFollowing)));
            }
        }
Пример #2
0
 public void UpdateDB(DBFollowing dbFollowing)
 {
     dbFollowing.Created            = Created;
     dbFollowing.FollowerAppUserId  = FollowerId;
     dbFollowing.FollowingAppUserId = FollowingId;
 }
Пример #3
0
 public AppUserFollowing(DBFollowing dbFollowing)
 {
     Created     = dbFollowing.Created;
     FollowerId  = dbFollowing.FollowerAppUserId;
     FollowingId = dbFollowing.FollowingAppUserId;
 }