public string CreateUser(User newUser)
        {
            Models.user user = new user();
            user.firstname = newUser.Firstname;
            user.lastname = newUser.Lastname;
            user.username = newUser.Username;
            user.password = newUser.Password;
            user.role_id = newUser.Role.Id;
            user.email = newUser.Email;

            db.users.InsertOnSubmit(user);

            return Submit("Ny bruger oprettet.");
        }
Exemple #2
0
 partial void Deleteuser(user instance);
Exemple #3
0
 partial void Updateuser(user instance);
Exemple #4
0
 partial void Insertuser(user instance);
Exemple #5
0
		private void detach_users(user entity)
		{
			this.SendPropertyChanging();
			entity.role = null;
		}
Exemple #6
0
		private void attach_users(user entity)
		{
			this.SendPropertyChanging();
			entity.role = this;
		}