public void RegisterInNewsLetter(RegisterInNewsLetter model) { SqlCommand sqlCommand = new SqlCommand(); sqlCommand = connection.CreateCommand("[dbo].[RegisterInNewsLetter]", CommandType.StoredProcedure); sqlCommand.Parameters.AddWithValue("@UserName", model.UserName); sqlCommand.Parameters.AddWithValue("@Password", model.Password); sqlCommand.Parameters.AddWithValue("@PhoneNumber", model.PhoneNumber); sqlCommand.Parameters.AddWithValue("@Email", model.Email); sqlCommand.Parameters.AddWithValue("@UserType", model.UserType); sqlCommand.Parameters.AddWithValue("@Intrests", model.Intrests); sqlCommand.Parameters.AddWithValue("@NotificationType", model.NotificationType); sqlCommand.ExecuteNonQuery(); sqlCommand.Dispose(); }
public ActionResult RegisterInNewsLetter(RegisterInNewsLetter model) { database.RegisterInNewsLetter(model); return(Json("")); }