Music. Coding. Gaming. Life.

More XAML fun

Posted Thursday, December 6th, 2007 12:30:00 am
Today I learned the value of the application.xaml file, which basically details your default values for control properties. The nice thing is that it lets you make controls that behave like a button, but can look like anything you want. So, I made me some nice rounded buttons based on a tutorial I viewed on the web. I also did the same with drop downs, which look real slick.

The biggest problem I've come across, surprisingly, is with LINQ to SQL stuff. All of my sites validate users via email, and the user table has a corresponding property called "Validated". I have a DEFAULT constraint setup to initialize it to FALSE, and when the user validates I change it to TRUE.

The problem I am having stems from the fact that when you insert a record through LINQ to SQL, it has no way of knowing what your DEFAULT constraint is, and thus expects a value. So far, I haven't figured out a way that allows the database to assign the value to this record while at the same time allowing me to later update that record without throwing an exception. The exception? LINQ believes that since you assigned a value at the database, you can't go and change it in code.

Well, that's certainly wrong, so I made a post to Microsoft's forums asking how to handle this. Hopefully that'll be up before I get home, and once that's resolved, the registration and validation process for Six Minutes To Release should finally be complete.

Comments

Loading...
roncli.com Media Player