LINQ, Anonymous Types and Interfaces Revisited

After making my previous post I worked on it a bit more, and found that the best way to accomplish what I was trying to do, creating quick data layer that I can change later, was to simply add the IExample interface to the partial class definition. I know I can create this with Subsonic or another  DAL generator, but currently they aren’t on the list of tech I want to learn at the moment.

And while this did work, I ran into an error in the dbmI designer when I clicked “View Code” from the context menu:

image

This seems to happen when the project has a default namespace assigned to it or possibly having an Entity Namespace set, since I have both. I haven’t looked to much into it since VS puts the partial class definition that it goes to in the cs file of the same name as the dbml file, so I doubt I will be using the view code much anyway.

 

Technorati Tags: , ,