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."); }
partial void Deleteuser(user instance);
partial void Updateuser(user instance);
partial void Insertuser(user instance);
private void detach_users(user entity) { this.SendPropertyChanging(); entity.role = null; }
private void attach_users(user entity) { this.SendPropertyChanging(); entity.role = this; }