I have an object with following attributes
Books
----------
ID , Name
Now, I want to return an object for a gridview in presentation layer which has a lot more attributes then the original object
Gridview Object
---------------
ID, Name, Quantity, Location, ISBNNO, LastIssued
I don’t have any business object composed of these attributes currently & I don’t want to create it just for the sake of a gridview.
How do I create & return custom
objects like these on the fly ? I am
new to DTO’s. Can someone give me an
example to return a DTO inside my DAL
?
Thanks,
Damien.
if you don’t want to mess with your database objects, create a decorator for it
and in your gridView use: