partial void DeleteUser(User instance);
partial void InsertUser(User instance);
partial void UpdateUser(User instance);
public User AddUser(RegisterViewModel viewModel) { User newUser = new User(); newUser.DateAdded = DateTime.Now; newUser.YearOfBirth = viewModel.dobYear; newUser.Location = viewModel.county; newUser.LastLoginDate = DateTime.Now; newUser.UserRating = 0; newUser.Username = viewModel.username; newUser.Password = viewModel.password; newUser.Alias = viewModel.username; newUser.Email = viewModel.email; newUser.Stereotype = "NULL!"; if (viewModel.gender == "1") newUser.Male = true; else if (viewModel.gender == "0") newUser.Male = false; db.Users.InsertOnSubmit(newUser); db.SubmitChanges(); return newUser; }