DB connected business objects

  • Thread starter Thread starter Billy Porter
  • Start date Start date
B

Billy Porter

Greetings,

I need some help on writing business objects in C#. These objects are
suppose to communicate with a SQL server DB through a DAL.
So let's say I want to create a new Customer (simply adding a new record in
my Customers table). How would you suggest I go about it? Should I use
static Create and Delete methods and a non-static Save method for updating
the values?
 
You should consider the architectural requirements of your application
before writing a single line of C# code. Usually you want all database
access to be through disconnected, stateless components. On the server
side, stored procedures that map to the methods in your DAL is one way
to go, but not the only one. Whatever you decide, it's best to plan
things in advance. Otherwise, you end up writing a lot of code and
throwing it away later. There's lots of good resources, whitepapers,
and sample code in the help files and on MSDN.

-- Mary
MCW Technologies
http://www.mcwtech.com
 
Back
Top