Ejemplo n.º 1
0
 public void Add(string username, string email, string firstname, string lastname)
 {
     MyUser user = new MyUser();
     User copyUser = db.Users.SingleOrDefault(x => x.UserName == username);
     user.UserId = copyUser.UserId;
     user.Username = username;
     user.Email = email;
     user.FirstName = firstname;
     user.LastName = lastname;
     db.MyUsers.AddObject(user);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the MyUsers EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToMyUsers(MyUser myUser)
 {
     base.AddObject("MyUsers", myUser);
 }
 /// <summary>
 /// Create a new MyUser object.
 /// </summary>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="username">Initial value of the Username property.</param>
 public static MyUser CreateMyUser(global::System.Guid userId, global::System.String username)
 {
     MyUser myUser = new MyUser();
     myUser.UserId = userId;
     myUser.Username = username;
     return myUser;
 }