Linq-to-SQL task.
See pictures.





When I try to instantiate this, I get runtime exception 'The null value cannot be assigned to a member with type XAccountId which is a non-nullable value type'. When I change Type from XAccountId to int - everything works as expected. Why? How I can use my enum as Type of keys?
ADDITION: Although I set Nullable = true in property window, generated code is private XAccountId _AccountId1 = default(XAccountId);. So... DBML generator works incorrectly?
ADDITION 2: http://social.msdn.microsoft.com/Forums/en-US/ee4f5703-570c-47bf-8003-bf15bd0f1441/map-nullable-enum related to my problem. DBML generator ignores CanBeNull="true" for enums.