Enum mapping in LINQ to SQL and VB.NET
We have a LINQ-to-SQL datacontext with some int columns we want to map to Enum values. This is in VB.NET and we tried the "Global." prefix trick that works in C#, where global:: maps a field to an enum [see other StackOverflow references on this].

The problem is that SQL metal doesn't generate the code properly for VB.NET and instead creates code like this:

    Private _OrderStatusID As [Global].Anvil.Mobile.MobileOrderStates

This won't compile so we have to manually fix by removing the brackets so that the generated code compiles. If we remove the Global. prefix we get the DBML1005 Anyone know a fix/workaround?


Enum mapping in LINQ to SQL and VB.NET
===

We have a LINQ-to-SQL datacontext with some int columns we want to map to Enum values. This is in VB.NET and we tried the "Global." prefix trick that works in C#, where global:: maps a field to an enum [see other StackOverflow references on this].

The problem is that SQL metal doesn't generate the code properly for VB.NET and instead creates code like this:

    Private _OrderStatusID As [Global].Anvil.Mobile.MobileOrderStates

This won't compile so we have to manually fix by removing the brackets so that the generated code compiles. If we remove the Global. prefix we get the DBML1005 Anyone know a fix/workaround?

