What is better for my ASP.NET project using (Server explorer) or DBconnect class?

I have an ASP.NET project and I want to know which is better to use.

Connect ODBC to the server explorer (drag and drop a DataSet and change it) or make some DBconnect class with a database connection, queries and use it for a GridView?

When I use the server explorer, I don’t have a good feeling, because all the logic is on the aspx page, and I am not separated from the application level logic level.

This lagre, databese (PostreSQL) application has 18 tables, and difficult restrictions and the application must create some documents, etc.

+4
source share
3 answers

"Better" depends entirely on your situation. Is the goal to do something as quickly as possible for internal users in your company, or will it be a commercial site that should be very extensible and should be as easy to maintain? Will you need to integrate with other platforms, perhaps built using other languages ​​at some point? The answers to all these questions should affect your decision.

If you want to split your project into separate layers, I would recommend ORM, such as NHibernate or Entity Framework (there are other commercially available ORM products, but these are those that I am familiar with and with which you can easily get help on this site) .

+2
source

Create a data source with LINQ to Entity. This allows you to freely LINQ with peace of mind when you change something that il will break your assembly so that you can debug more efficiently.

+1
source

Well, if you have full flexibility, I would recommend using C # ASP.NET 4 with MVC3 razor for the user interface and application code. First, use the Entity Framework 4.1 code for the data access layer.

This way, you will always work with the real objects you create and with List<realtype> instead of the complete mess that exists with datasets.

+1
source

All Articles