Inheritance: System.Data.Objects.DataClasses.EntityObject
 /// <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(User user)
 {
     base.AddObject("Users", user);
 }
示例#2
0
 private static void SaveUsers(int num, string email)
 {
     for (int i = 0; i < num; i++)
     {
         var user = new User
         {
             Name = i + " " + GetNameFromEmail(email) ,
             Email = i + " " + email,
             Password = "******"
         };
         repository.AddToUsers(user);
     }
 }
 /// <summary>
 /// Create a new User object.
 /// </summary>
 /// <param name="email">Initial value of the Email property.</param>
 public static User CreateUser(global::System.String email)
 {
     User user = new User();
     user.Email = email;
     return user;
 }