One datasource for project

141 Views Asked by At

I'm using wizard to add tables to my project to work with them. Is having just one datasource for project better way? At the moment there is only 5 tables.


POST EDIT It's so cumbersome and I'm feeling myself going wrong way to use wizard, that makes another one dataset for every table, so I thought about just one dataset for my little application. But as I have little experience with ADO .NET, I hope to get advice here.

3

There are 3 best solutions below

0
On

I find it's much easier to maintain an application when features of the system are isolated from one another. So in this instance having a dataset, one for each way the system is accessed, would make it easier to maintain.

an example of how this plays out:

  1. a context to search for customers
  2. a context to allow a customer to place an order
  3. a context to add a product to a customer's shopping cart

this is probably overkill for a system of 5 tables, but if you can train yourself to think in context specific usages, it makes it much easier to expand and change the system moving forward.

0
On

If you want to use typed DataSet instead of EF or Linq2Sql just add new DataSet to your project, open it, right click and Add->TableAdapter, add all tables you need.

3
On

Perhaps is better to use Entity Framework 4.1 / 4.2