Exemplo n.º 1
0
        public void CreateUser()
        {
            using (TransactionScope scope = new TransactionScope())
            {
                string email = "*****@*****.**";
                User u = new User()
                {
                    Password = "******",
                    Email = email,
                    IsActive = true,
                    CreatedAt = DateTime.Now
                };

                User.SaveUser(u);

                Assert.IsNotNull(User.GetByEmail(email));
            }
        }
Exemplo n.º 2
0
 partial void DeleteUser(User instance);
Exemplo n.º 3
0
 partial void UpdateUser(User instance);
Exemplo n.º 4
0
 partial void InsertUser(User instance);
Exemplo n.º 5
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(User user)
 {
     base.AddObject("Users", user);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Create a new User object.
 /// </summary>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="password">Initial value of the Password property.</param>
 /// <param name="email">Initial value of the Email property.</param>
 /// <param name="isActive">Initial value of the IsActive property.</param>
 /// <param name="createdAt">Initial value of the CreatedAt property.</param>
 public static User CreateUser(global::System.Int32 userId, global::System.String password, global::System.String email, global::System.Boolean isActive, global::System.DateTime createdAt)
 {
     User user = new User();
     user.UserId = userId;
     user.Password = password;
     user.Email = email;
     user.IsActive = isActive;
     user.CreatedAt = createdAt;
     return user;
 }