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))); } }
public void UpdateDB(DBFollowing dbFollowing) { dbFollowing.Created = Created; dbFollowing.FollowerAppUserId = FollowerId; dbFollowing.FollowingAppUserId = FollowingId; }
public AppUserFollowing(DBFollowing dbFollowing) { Created = dbFollowing.Created; FollowerId = dbFollowing.FollowerAppUserId; FollowingId = dbFollowing.FollowingAppUserId; }