Exemplo n.º 1
0
        public long InsertUser(User user)
        {
            var newuser = new Users();
            newuser.userName = user.UserName;

            //Check facebookid
            var facebookUser = user as FacebookUser;
            if (facebookUser != null)
                newuser.facebookId = facebookUser.FacebookUserId;

            _data.Users.AddObject(newuser);
            _data.SaveChanges();

            return newuser.userId;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new Users object.
 /// </summary>
 /// <param name="userId">Initial value of the userId property.</param>
 /// <param name="userName">Initial value of the userName property.</param>
 public static Users CreateUsers(global::System.Int64 userId, global::System.String userName)
 {
     Users users = new Users();
     users.userId = userId;
     users.userName = userName;
     return users;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToUsers(Users users)
 {
     base.AddObject("Users", users);
 }