Пример #1
0
        public void Add(RegisterModel user1)
        {
            PWMM.Models.DB.Users user = new PWMM.Models.DB.Users();
            user.ID_USER = dre.Users.OrderByDescending(u => u.ID_USER).Take(1).SingleOrDefault().ID_USER + 1;
            user.LOGIN = user1.UserName;
            user.EMAIL = user1.Email;
            user.PASS = user1.Password;
            user.RULES = 1;

            dre.AddToUsers(user);
            dre.SaveChanges();
        }
Пример #2
0
 /// <summary>
 /// Create a new Users object.
 /// </summary>
 /// <param name="iD_USER">Initial value of the ID_USER property.</param>
 public static Users CreateUsers(global::System.Int32 iD_USER)
 {
     Users users = new Users();
     users.ID_USER = iD_USER;
     return users;
 }
Пример #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);
 }