This article is not about the negative aspects of HTML but about that other dark side of HTML that is called shadow DOM . If you are a frontend developer and you have never heard about shadow DOM then you should definitely keep reading because you are missing some cool stuff about webdevelopment. Continue reading
Month: April 2015
How to Configure a Self Referencing Entity in Code First
Recently I was working on a project that required a categorization option. I wanted the user to have the option to create categories and as many subcategories as they wanted. To realize this I created a category model that was self referencing:
1 2 3 4 5 6 7 8 9 |
public class Category { public int Id { get; set; } public string Name { get; set; } public int? ParentId { get; set; } [ForeignKey("ParentId")] public virtual Category Parent { get; set; } } |