Have not tested it by myself.
http://blogs.msdn.com/b/alexj/archive/2009/06/05/tip-23-how-to-fake-enums-in-ef-4.aspx
Create complex type definition in your edmx.
<ComplexType Name="IsActiveWrapper" >
<Property Type="string" Name="Value" Nullable="false" />
</ComplexType>
Create complex type
public class IsActiveWrapper
{
private bool isActive;
public string Value
{
get
{
return isActive ? "Y" : "N";
}
set
{
isActive = "Y".Equals(value);
}
}
public bool IsActive
{
get { return isActive; }
set { isActive = value; }
}
public static implicit operator IsActiveWrapper(bool isActive)
{
return new IsActiveWrapper { IsActive = isActive };
}
public static implicit operator bool(IsActiveWrapper wrap)
{
if (wrap == null) return false;
return wrap.IsActive;
}
}
Now you can do something like this
public class TestIsActive
{
public virtual IsActiveWrapper IsActive { get; set; }
}
var test = new TestIsActive { IsActive = true };