Work with datasets in n-tier applications
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
N-tier data applications* are data-centric applications that are separated into multiple logical layers (or tiers). In other words, an n-tier data application is an application that is separated into multiple projects, with the data access tier, the business logic tier, and the presentation tier each in its own project. For more information, see N-Tier Data Applications Overview.
Typed datasets have been enhanced so that the TableAdapters and dataset classes can be generated into discrete projects. This provides the ability to quickly separate application layers and generate n-tier data applications.
N-tier support in typed datasets enables iterative development of the application architecture to an n-tier design.It also removes the requirement to manually separate the code into more than one project. Start out designing the data layer by using the Dataset Designer. When you're ready to take the application architecture to an n-tiered design, set the DataSet Project property of a dataset to generate the dataset class into a separate project.
In This Section
Separate datasets and TableAdapters into different projects Describes how to move the generated dataset class out of the project that contains the generated TableAdapter classes and into a new project.
Add code to TableAdapters in n-tier applications Describes how to generate a partial class in which code can be added for an n-tier TableAdapter.
Add code to datasets in n-tier applications Describes how to generate a partial class in which code can be added for an n-tier dataset.
Add validation to an n-tier dataset Describes where to add code to perform validation on changing data.
Walkthrough: Creating an N-Tier Data Application Provides step-by-step instructions for creating a typed dataset and separating the TableAdapter and dataset code into multiple projects.
Walkthrough: Adding Validation to an N-Tier Data Application Provides step-by-step instructions for adding validation to the application that was created in the n-tier data application walkthrough.