.net and DB Data layer : Best Practice

  • Thread starter Thread starter David
  • Start date Start date
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
 
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
 
Back
Top