Anonymous Types
There are 2 entries for the tag
Anonymous Types
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:
This seems...
posted @ Sunday, December 09, 2007 12:01 AM |
I finally had a chance to sit and work with LINQ for a bit, and while it is very cool, a little bit of its luster was lost when I can assign interfaces to the anonymous classes generated by the queries. Meaning I can not do something like:
public interface IExample
{
string Name { get; set; }
string Description { get; set; }
}
public class DataGenerator
{
public IEnumerable<IExample> GetExamples(string categoryName)
{ //Context Definition IEnumerable<IExample> examples =
...
posted @ Thursday, December 06, 2007 10:50 PM |