How to map a string to Uri type using the Entity Framework?

My database contains a column of type string, that represents a URL. I'm now wondering how its possible to map this string to a Uri object using the Entity Framework.

Any ideas?


Use a partial class, w/ a custom property:

    public partial class MyClass
        public Uri MyUri
                { return new Uri(StringUriPropertyFromDB); }

You can make the string property private in the EF designer, if you want. Note you can't use custom properties like this in LINQ to entities, though.

Need Your Help

why does this work fine the first time around but not the 2nd time around?

c# static quartz-scheduler

I am using a scheduler that will send out reminders through a library called actionMailer. I however need the httpcontext to work as well actionMailer uses mvc.