Пример #1
0
 public static List <Customer> GetCustomers()
 {
     using (SqlConnection con = new SqlConnection(connString, credentials))
     {
         try
         {
             con.Open();
             return(DBActions.ExecReaderListSP <Customer>(con, "getAllCustomers"));
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
             return(null);
         }
         finally
         {
             con.Close();
         }
     }
 }