How to have DataTable/DataSet in Business Object Class

A

Aryan

Hi,
I am implementing Business object, but while implementing this I
want to have DataTable or DataSet as part of Business Object. For
example, I want to bind controls directly to these Business Objects. So
please suggest me how can I achieve this??

Is is good to create a Property in Business Object which will have
return type as "DataTable / DataSet"?? or what could be the optimum way
to achieve the same.

Thanks & Regards,
Manoj Singh
 
M

Michael Nemtsev

Hello Aryan,

A> I am implementing Business object, but while implementing this I
A> want to have DataTable or DataSet as part of Business Object. For
A> example, I want to bind controls directly to these Business Objects.
A> So please suggest me how can I achieve this??

it's not necessary to bind to the DataSet/DataTable, you can use Array for
this or just XML

A> Is is good to create a Property in Business Object which will have
A> return type as "DataTable / DataSet"?? or what could be the optimum
A> way to achieve the same.

It depends. If using DataTable doesnt impact negatively on your performance
and meed your requirements just use it

---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsch
 
D

Duggi

Hi

You can bind controls directly to the business objects it self. you
need to have the data exposed out of business object. (As mentioned
properties). you will have two options here... Make the properties
static so that they are directly accessible. other choice would be make
an object of business object class in the form having these controls.
This decision should be driven from the requirements you have at your
hand.


Thanks
-Srinivas.
 

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