This is a pretty straight-forward question. I was wondering if there is some kind of interface I could use to represent any of the entities returned by my Linq-To-Sql dbml?
So I could let’s say return things such as IQueryable and it could simply get casted back in its right entity afterward for example?
Thanks!
You can change the code generation for your Linq to Sql entities. Here you can find T4 templates for Linq to Sql.
If you use those, you can let all entities implement a specific interface.
Or you could implement the interface in another code file on the partial class for each entity.