You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Hi folks,
Marco says on page 52 of his book that ArticleProvider (which is a base class to sqlArticleProvider has an Instance static method that
returns an actual instance of the correct class
"according to what's specified in the configuration file"
however I stepped through this and when I get to the Instance property:
but this string isn't in any configuration file that I can find...it's in a class called ConfigSections in ConfigSections.cs in app_code folder
[ConfigurationProperty("providerType", DefaultValue = "MB.TheBeerHouse.DAL.SqlClient.SqlArticlesProvider ")]
public string ProviderType
{
get { return (string)base["providerType"]; }
set { base["providerType"] = value; }
}
is this a typo on Marco's behalf or is this fully qualified classname in a configuration file as well and I just can't find it
I understand the elegance of what he's trying to do with the abstract classes and separating the DAL from the BLL etc...it's just that I want to make sure that I'm not missing something as to exactly where this setting is stored...
Many thanks in advance for any clarifications,
Regards
MM
thanks for answering englere, but that was my exact question, as I can't find the string in the config file, because it's not there, but it is in the default value of the attribute in the class that inherits from configurationSection...any ideas?