DCSIMG
Orcas Datasets - Separate Datasets from TableAdapters - Guy Burstein's Blog

Guy Burstein's Blog

Developer Evangelist @ Microsoft

News

Guy Burstein The Bu

Disclaimer
Postings are provided 'As Is' with no warranties and confer no rights.

Guy Burstein LinkedIn Profile

TwitterCounter for @bursteg

Links

Articles

Blogs I Read

Orcas Datasets - Separate Datasets from TableAdapters

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!

Comments

Guy Burstein's Blog said:

Over the past year I've written almost 300 posts, and recently I took the time to see which posts were

# July 29, 2007 9:35 PM

Dave said:

It is great this feature is built-in to VS 2008, but the dataset and table adapters aren't actually inseperable in 2005. They are generated in one file (in two different namespaces), but I routinely cut the table adapter out of the Designer.cs file and created a new file for it in another DLL, added a using statement so it could find the dataset in the original assembly, and compiled. Worked fine; you just have to do the cut and copy every time you re-configure the dataset, which wasn't all that often.

Dave

# November 28, 2007 7:33 AM

Guy Burstein on MSDN said:

Slide Decks and Demos for Data Access Session @ Tech Ed Israel 2008 Earlier this week I presented at

# April 10, 2008 3:46 PM

nick_getroa said:

# May 18, 2009 9:59 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: