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(); }
/// <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; }
/// <summary> /// Deprecated Method for adding a new object to the Users EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToUsers(Users users) { base.AddObject("Users", users); }