I have multiple C# projects in a Visual Studio solution right now that will all use the same SQL Server database.
What is the proper way to share LINQ-to-SQL classes between projects?
I'm considering just copying the dmbl files into each project, but I think that may be too redundant. Is there a better way to approach this?
I suppose you need to share database access code between projects not linq-2-sql classes as they are.
Build Data Access Library (DAL) that expose operations over database that are implemented via linq-2-sql classes rather then expose classes.
I'd suggest to use Repository Pattern
Refer DAL library from projects you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With