Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Base Data Access Classes
Message
De
03/07/2010 18:36:40
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
 
 
À
03/07/2010 18:05:01
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 4.0
Divers
Thread ID:
01471343
Message ID:
01471351
Vues:
42
No problem. Taught me a lesson about checking which references I have added.

>Sorry about that ... I posted stuff from an old class and even though it's obsolete, it still works just fine. I have been using the same code off and on for various projects. But to avoid confusing someone else, I should probably update the code sample to use the newer ConfigurationManager. I presume that there probably aren't too many people still using .NET 1.1 <g>
>
>~~Bonnie
>
>
>
>>I have been working on Bonnie's data class blogs and have an interesting problem (at least for me). I created a class library for what I call my base data access classes. When I add the database connection screen code from Bonnie's blog cConnection = ConfigurationSettings.AppSettings["ConnectionString"]; I get a warning that the method is obsolete. I changed to the suggested method, cConnection = ConfigurationManager.AppSettings["ConnectionString"]; and get an error ConfigurationManager does not exists. If I put the same code in my web project all is well. My assumption is the class library does not have the web.config file so it does not understand configuration. I do have the same using statements at both places. Is it not possible to create generic data classes this way?
>>
>>Thanks.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform