Use a partial class, with a custom property:
public partial class MyClass
{
public Uri MyUri
{
get
{ return new Uri(StringUriPropertyFromDB); }
}
}
You can make the string property private in the EF designer if you want. Note that you cannot use custom properties like this in LINQ for objects.
source
share