Wednesday, October 22, 2008

Certification Second Shot Changes

Microsoft is trying to entice more people with their Second Shot program. If you sign up for this program Microsoft will give you a free second change to take a certification exam if you fail it. I have signed up for this in the past, but never actually used it (hehe). Well this program is now even better.

You still get to retake an exam if you fail it. But now there is an incentive for people that pass the exams. If you pass you get 25% off the price of the next exam that you take. If you take alot of exams like I do, this is a nice little benefit.

Have fun with your testing.

Sunday, October 12, 2008

Linq-to-SQL and Derived Classes

LINQ is a nice new data technology that really provides alot of functionality. LINQ-to-SQL is a version of it that talks to a SQL Server database and will generate classes for you to use. I had a small problem that took a while to figure out that I wanted to share.

I had a class generated from the database called User. From there I had a derived class named ProtectedUser that has some things set in it automatically. When I created a ProtectedUser object when I went to save off the object to the database a null exception was thrown. This was confusing since there was nothing wrong with the object and nothing was null.

Looking around online I found this article that describes the problem:

After changing my code to create a new User object and save that off instead things worked perfectly fine. This was hard to find and took weeks of working on it on and off to find it. I wanted to make sure to share this with others to save them the time.