Weird mapping error in linq-to-sql dbml file in VS2010
Posted
by rwwilden
on Stack Overflow
See other posts from Stack Overflow
or by rwwilden
Published on 2010-04-22T10:00:54Z
Indexed on
2010/04/22
10:03 UTC
Read the original article
Hit count: 333
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.
© Stack Overflow or respective owner