Click here to Skip to main content
15,881,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have 30 Tables in my SQL Database (2008) and each of them i Generat class in my .Net project. ( by this application [SQL and VB.NET Code Generator] )

but the problem that every class has the same common function like "GetAllClient as datatable" And "GetAllSupplier as datatable" ....
i want a way to create one time the functions and generate these for all my classes, i don't want to copy paste the functions and rename the that what must rename .

what is the best solution for these issue ? i have a solution but i don't know if it correct that creating Father Class have these common functions and the child inherit it, is it good solution ?
Updated 11-Dec-13 23:34pm
Simon_Whale 12-Dec-13 5:36am    
what are you using for a data access? ADO.NET? Entity Framework? LinQ2SQL?
Ahmad Al Halabi 12-Dec-13 5:38am    
ADO.Net , Should i change it to Entity Framework ?

1 solution

Share this answer

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