.net and DB Data layer : Best Practice

D

David

I am converting an app. from PHP to .net. I know that you can create
an xsd and then have the system generate code to load data into a
dataset. I assume that you use this and an a data adapter to talk to
the DB.

However, is this the "optimal" or recommended way to add, update, etc.
information? Or should one create code to accept the data and then
pass it to a stored procedure?

I do not dislike the adapter way, but I can see that it could
introduce problems and the programmer can loose control which may
cause errors or data integrity violations.

Comments?

Thanks
 
C

Cor Ligthert [MVP]

David,

First of all there is in general no Best Practice in Net. Therefore there
are to much alternartive methods.

However in general I prefer for data to be updated by an UI (user
interface), to use the dataadapter.
Data to be updated serialized, just do it direct to the DataBase using a
datareader and executenonquery

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top