Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Separate Datasets from TableAdapters

http://blogs.microsoft.co.il/blogs/bursteg/archive/2007/05/19/OrcasDatasets.aspx

Orcas Datasets – Separate Datasets from TableAdapters

In Visual Studio 2005, we were introduced to the new DataSet Designer, that also generated a TableAdapter for each DataTable in the DataSet.

 Orcas Datasets - Separate Datasets from TableAdapters

Along with this great way of creating Data Access Layer for easily, there was a big problem. The Table adapters and the generated Data set are inseparatable which means that when you expose your business entities to the client side or another services, you also expose your data access layer with the connection info inside. This is both a security issue and a software engineering problem.

Orcas Datasets - Separate Datasets from TableAdapters

After receiving some feedback about these problems, Visual Studio “Orcas” can help us with that. The new DataSet Designer has a new property called DataSet Project, that lets you specify a project in which the generated DataSet and table will be created.

Orcas Datasets - Separate Datasets from TableAdapters

With this feature you can easily separate between the Data Access Layer components (the Table Adapters) and the generated business entities. This can help you expose your business entities without exposing your DAL and your connection info.

Orcas Datasets - Separate Datasets from TableAdapters

Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *