title: Enum mapping in LINQ to SQL and VB.NET
body: <p>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].</p>
  
  <p>The problem is that SQL metal doesn't generate the code properly for VB.NET and instead creates code like this:</p>
  
  <pre><code>Private _OrderStatusID As [Global].Anvil.Mobile.MobileOrderStates
  </code></pre>
  
  <p>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?</p>