Yesterday my boss had me upgrade the project files of our main app to use Visual Studio 2008.
While doing this the migration wizard asked if I wanted to upgrade the app to work against the .Net 3.5 framework. He had said to just migrate the solution files for now, and later when there was time we would upgrade the framework version.
Then he asked something I hadn’t really thought about.
“Does the .Net 3.5 framework support Windows 2000?”
And its been quite a while since a single question had essentially ruined my day, but this one pretty much had. I guess I should say that it was the “no” that I responded with that really did it, since it meant that it will likely be years until we upgrade it (we officially dropped support for SQL7 around June). The worst part is that not upgrading the framework for the most part the right decision for the company, as many of our existing customers use Windows 2000.
Unlike the 2.0 framework, which because of having our own framework essentially I could only really make use of generics, the new features in 3.5 framework (and inclusion of 3.0) had a lot of promise. However, since most of what I wanted to use it for could be done without it the 3.x features with some extra work, I find myself unable to come up with a strong enough case (though I really wish I could) that would counter act the possible loss of existing customers.
Unfortunately there is one other downside to this decision which, because of the environment that my boss has created, I doubt will come up until it is to late. Might expand on this at a later time, but I really want to get back to playing with the MVC framework right now.

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 =
from x in db.Examples //LINQ to SQL Class where x.Category.Name = categoryName
select new IExamples { Name = x.Name , Description = x.Description } ;
// There is probobly better syntax for this
return examples;
}
}
Now I know I could instead do
public class Example
{
public string Name { get; set; }
public string Description { get; set; }
}
public class DataGenerator
{
public IEnumerable<Example> GetExamples(string categoryName)
{
//Context Definition
IEnumerable<Example> examples =
from x in db.Examples //LINQ to SQL Class,
where x.Category.Name = categoryName
select new Example{ Name = x.Name, Description = x.Description };
return examples;
}
}
or if I wanted to continue only exposing an interface
public interface IExample
{
string Name { get; set; }
string Description { get; set; }
}
internal class Example:IExample
{
public string Name { get; set; }
public string Description { get; set; }
}
public class DataGenerator
{
public IEnumerable<IExample> GetExamples(string categoryName)
{
//LINQ to SQL Context Definition
var examples =
from x in db.Examples where x.Category.Name = categoryName
select new Example{ Name = x.Name , Description = x.Description };
return examples.OfType<IExample>();
}
}
Over all this isn’t a big issue since the second method works just fine for what I am trying to accomplish for the most part. But it feels kind of off having to make a throwaway class to accomplish this.

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 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.
