There are three methods on the DataService<T> class that you might want to override.
The first is CreateDataSource. Typically when the data source (the 'T') needs to be constructed, an empty constructor will be invoked. This is great if the default constructor can pick up information from a web.config file, for example, but sometimes you need to do some initialization yourself, like reading a connection string from somewhere else. In this case, you can simply override CreateDataSource to do all the work you need and create a new instance. Typically this method will be called once per request.





