I would like to create a linq to sql class library that I can reference in all of my custom modules for this project I am working on. Does anyone have any suggestion or examples that I may reference?
I have about 3-4 custom modules requirements that all will pull data from the same set of tables. I could implement this using the standard dataprovider model, however, I like a good challenge and I love working with linq.
I would like to create a linq to sql class library that I can
Share
I haven’t developed any module with linq but following are my suggessions:
This way if you want only two custom modules to be delployed, it will just work fine. the only drawback will be, dll will have all the other classes not used in those modules.
SqlDataProvidercreate constructor ofdataContextwith passingconnectionStringin it. (There is already one to use)This way, you are using same connection string that dnn is using and no problems!
Also there is a good sample on it here : http://adefwebserver.com/dotnetnukehelp/linqtutorial/
I hope this will help you.