• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 222
  • Last Modified:

Row returned from Database to an Entity object

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
kingpreetham
Asked:
kingpreetham
1 Solution
 
eternal_21Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now