Since I switched to VS2010, several times a day I get a compilation error in my dbml file:
DBML1005: Mapping between DbType 'bigint' and Type
'MyNamespace.SecurityToken' in Column 'SecurityToken' of Type
'Employee' is not supported
When I restart VS2010 the error disappears. I have no problems running my application using this dbml file (specifically, there are no problems getting correct values inside the SecurityToken
property of Employee
objects).
The SecurityToken
property is of an enum type defined as follows:
[Flags]
public enum SecurityToken : long
{
None = 1,
Admin = 2,
......
}
The SecurityToken
column in the database is of type bigint
.
Am I missing something? It's especially weird that the error only happens sometimes, when I'm writing code that isn't related at all to the LINQ model.