Hi All

 

In my legacy VB6 application,  business objects are populated in the
following way;

 

I have a customer class with properties like ID, Name, Address,
AmountDueCurrent, AmountDue30Days, etc  ( i.e some read only properties )

 

To retrieve a customer from the database,  I call a stored proc and copy the
output values  to an instance of the customer class

 

To save a new customer, I call a stored proc addCustomer, to write the
essential fields and return the identity key.  Then I use  an updateCustomer
procedure which copies the write properties of the customer to  an ADO
recordset  for saving to the database.

 

To save an existing customer I just use updateCustomer

 

In the Dot Net upgrade project we are trying to figure out the best way
forward for data access.   I am keen on retaining the same business objects
- as it will make porting the code easier

 

For the example above, should I create the customer as a POCO object in
entity framework?  Or should I be creating a class for each table?  Or is
there some other option?

 

Pros & Cons ?

 

Thanks

Kirsten

 

 

Reply via email to