Solved

Row returned from Database to an Entity object

Posted on 2004-09-23
4
208 Views
Last Modified: 2010-04-15
Hi All,
 In my application, i am reading a set of columns from the database. The row returned has to be converted to an C# object. I could have created a class with attributes and set the attributes when data is read. However, the columns i read vary based on a configuration file. Is there a way to convert the data returned from the Database into an object.
Thanks,
Preetham.
0
Comment
Question by:kingpreetham
4 Comments
 
LVL 10

Accepted Solution

by:
eternal_21 earned 50 total points
Comment Utility
Not very easily.... And it won't be strongly-typed, so I can't see the advantage.  Why don't you just work with the System.Data.DataRow object?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now