Skip to content

Instantly share code, notes, and snippets.

@KyleGobel
Created October 15, 2013 12:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KyleGobel/6991033 to your computer and use it in GitHub Desktop.
Save KyleGobel/6991033 to your computer and use it in GitHub Desktop.
namespace Deerso.Domain.Models
{
public class CategoryFullPath
{
public CategoryFullPath()
{
}
public int Id { get; set; }
public string Name { get; set; }
public int ? ParentCategoryId { get; set; }
public bool ? Leaf { get; set; }
}
}
using System.Data.Entity.ModelConfiguration;
namespace Deerso.Domain.Models.Mapping
{
public class CategoryFullPathMap : EntityTypeConfiguration<CategoryFullPath>
{
public CategoryFullPathMap()
{
this.HasKey(t => t.Id);
this.Property(t => t.Name).HasMaxLength(1000);
this.Property(t => t.Leaf);
this.Property(t => t.ParentCategoryId).HasColumnName("Parent_Category_ID");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment