public void SignUp(UserDataView userData)
 {
     try
     {
         _connection.Open();
         SqlCommand cmd = new SqlCommand("dbo.AddUser", _connection);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@userName", userData.UserName);
         cmd.Parameters.AddWithValue("@password", userData.password);
         cmd.Parameters.AddWithValue("@name", userData.Name);
         cmd.Parameters.AddWithValue("@email", userData.email);
         cmd.ExecuteNonQuery();
     }
     catch (Exception exception)
     {
         Console.WriteLine("Failed to get the required user because " + exception.Message);
     }
 }
Esempio n. 2
0
 public void SignUP(UserDataView userView)
 {
     _sqlHelper.SignUp(userView);
 }