I want to create a mapping class similar to the one mentioned below. I want to convert this Fluent NHibernate mapping class to Entity Framework.
Fluent NHibernate
using FluentNHibernate.Mapping;
using MyBlog.Core.Objects;
public class PostMap: ClassMap<Post>
{
public PostMap()
{
Id(x => x.Id);
Map(x => x.Title)
.Length(500)
.Not.Nullable();
Map(x => x.ShortDescription)
.Length(5000)
.Not.Nullable();
Map(x => x.Description)
.Length(5000)
.Not.Nullable();
Map(x => x.Meta)
.Length(1000)
.Not.Nullable();
Map(x => x.UrlSlug)
.Length(200)
.Not.Nullable();
Map(x => x.Published)
.Not.Nullable();
Map(x => x.PostedOn)
.Not.Nullable();
Map(x => x.Modified);
References(x => x.Category)
.Column("Category")
.Not.Nullable();
HasManyToMany(x => x.Tags)
.Table("PostTagMap");
}
}
Is NHibernate support available with Hosting Services? Is it easily available with any ASP.NET Hosting or only selected services use it?