Page 1 of 1

Enum Support

Posted: Tue 19 Jan 2010 04:14
by Nahmis
Is there currently a way to use enums in LINQ-to-Oracle? Something like this exists in the Microsoft LINQ-to-SQL provider, any way to get equivalent behavior for the dotConnect oracle provider?

We have a RecordStatus column on every table, the RecordStatus is really an enum. It would be nice/more appropriate to be able to treat it this way instead of convertering to/from a int or long everywhere. Here's an example of what it would map to:

Code: Select all

 public enum RecordStatus
  {
   Active = 0,
   Inactive = 1,
   Deleted = 2
  }

Posted: Tue 19 Jan 2010 14:09
by AndreyR
We are investigating the possibility to add this functionality in one of the nearest builds.
I will let you know as soon as it is available.
As a workaround you can change your LINQ template to set the type for particular property to an enum, it will work.