Click here to Skip to main content
15,913,115 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Guys i need ur help.Here si
One Printer Can have multiple PriterTrays and PaperSizes,Schema is given below.

Table Schema : 3 Tables
1)Printer:
PrinterId,Name,PrinterStatus
1,ABC,2

2)PrinterTray
PrinterTrayId,Name,PrinterID
100,xyz,1
101,ddy,1

2)PaperSizes
paperSizeId,Name,PrinterId
1,abc,1
2,dww,1

BusinessObject/Model : (it will have complete information of printer along with respective printerTrays and printerSizes,as shown below)

class => Printer

printerid,
Name,
printerStatus,
list of PaperTrays;
list of paperSizes;

I want to fetch the records from Printer table and also dump the values of associated tables(PrinterTrays and Papersizes) using ado.net(Datatable,Dataset etc Not entity Framework).So that i can Map them with Business Object.


Thanks
Posted

1 solution

Your needs are perfectly served by Entity Framework[^]. I suggest you switch to EF.
 
Share this answer
 
Comments
anik butt 21-Jan-15 22:23pm    
yp.. you are right but according to client specification.we have to use ado.net.
Zoltán Zörgő 22-Jan-15 3:18am    
Than it is your duty as developer or as architect to present the drawbacks of it. By the way EF is ADO.NET technology. Or you can mimic the working way of EF by constructing the object yourself, loading the main entity data and the referred data too, with whatever you like.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900