/// <summary> /// Creates an instance of the provider based on the configuration data. /// </summary> /// <returns></returns> public static CustomerProvider Instance() { ProviderConstructorInfo info = ProviderBase.GetConstructorInfo(_sectionName, 1); // Get the constructor parameter and create an instance of the provider. object[] paramArray = new object[1]; paramArray[0] = info.Provider.Attributes["connectionString"]; CustomerProvider instance = (CustomerProvider)(info.ConstructorInfo.Invoke(paramArray)); instance.Initialize(info.Provider.Name, info.Provider.Attributes); return(instance); }