Created
October 15, 2013 12:44
-
-
Save KyleGobel/6991033 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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