C
cbrown
I am rebuilding an existing application that relies on an SQL DB. The
app is a scheduling/employee management program. My question pertains
to best practices in dotnet and database.
I use a 3 tier model and have custom classes for things like Employees.
What comes to question is when I load an Employee from my DB, I
populate the properties of the object with the data in the dataset.
When I want to view the employee on a form, i bind the properties to
form elements. To update the employee, I param the employee data and
send it back to the database. If I was using a dataadapter and
dataset, however, it would eliminate a lot of code and time.
Unfortunately this practice eliminates most of the benefits of
datasets, binding, the designer surface, etc. It also forces me to
create a custom collection for even the simplest of objects instead of
passing a dataset to the designer surface and binding it to a datagrid.
Is there a better practice, or should i continue with this course?
app is a scheduling/employee management program. My question pertains
to best practices in dotnet and database.
I use a 3 tier model and have custom classes for things like Employees.
What comes to question is when I load an Employee from my DB, I
populate the properties of the object with the data in the dataset.
When I want to view the employee on a form, i bind the properties to
form elements. To update the employee, I param the employee data and
send it back to the database. If I was using a dataadapter and
dataset, however, it would eliminate a lot of code and time.
Unfortunately this practice eliminates most of the benefits of
datasets, binding, the designer surface, etc. It also forces me to
create a custom collection for even the simplest of objects instead of
passing a dataset to the designer surface and binding it to a datagrid.
Is there a better practice, or should i continue with this course?