/// <summary>
 /// Create a new Users object.
 /// </summary>
 /// <param name="userId">Initial value of the UserId property.</param>
 /// <param name="userName">Initial value of the UserName property.</param>
 public static Users CreateUsers(global::System.Guid userId, global::System.String userName)
 {
     Users users = new Users();
     users.UserId = userId;
     users.UserName = userName;
     return users;
 }
        public Guid ReigsterUser(string firstName,string lastName,string userName,string password,string email,Guid accountType,bool sendEmail)
        {
            Users _myuser = new Users();

            _myuser.firstName = firstName;
            _myuser.lastName = lastName;
            _myuser.UserName = userName;
            _myuser.password = password;
            _myuser.emailAddress =email;
            _myuser.accountType = accountType;
            _myuser.isActivated = false;
            _dal.AddToUsers(_myuser);

               _dal.SaveChanges();

               Guid id = _myuser.UserId;
               string message = "Thanks for registering with the fundrasing program. Please click here to activate your <a href='activateaccount.aspx?id='" + id + ">Activate</a>";

               SendEmail("Regestration FundRasing",message,email);

               return id;
        }
 /// <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);
 }