I have been using Linq2Sql for the past few years and am used to several functions, for example, having an int or tinyint field in the database, which I override in an DBML file with an enumeration type, so itβs convenient and convenient to run an SQL query that is directly compared to enum (see here for my question 3 years ago on this question, and answer ).
Now I'm starting a project using Entity Framework 5, and although EF seems to have gotten a lot of rights that L2S did not (like disconnect / reconnect), I see with dismay that it seems to be any simple way to change C # type such a field as enum.
Has anyone found a way to do this cleanly so that I have a query like:
var q = entities.Things.Where(t => t.Status == TStatus.Closed);
(and no, I don't want to apply to int or byte inline).
source share