コード例 #1
0
ファイル: UserTest.cs プロジェクト: Aralcom/Parking
        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));
            }
        }
コード例 #2
0
ファイル: DataStore.designer.cs プロジェクト: Aralcom/Parking
 partial void DeleteUser(User instance);
コード例 #3
0
ファイル: DataStore.designer.cs プロジェクト: Aralcom/Parking
 partial void UpdateUser(User instance);
コード例 #4
0
ファイル: DataStore.designer.cs プロジェクト: Aralcom/Parking
 partial void InsertUser(User instance);
コード例 #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);
 }
コード例 #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;
 }