Hello.
I am working on categories in my project an i need to create multi level menu for categories.
I am very confused in Model creating And inserting method
Model:(Category.cs)
int Id
String Title
Int ParentId
[ForeignKey("ParetId")]
Category ParentCategory
List<Category> Children
But when I use dotnet ef migrations add "migrationname"
I get error about cycle deletion and says I can not create migrations
I am using asp.net core 2 And entity framework core
What I want?
I want to have an create view to add new category with a dropdownlist to select parent category and if it is a parent set drop downlist as 0.
Then in a partial view get list of categories and show like multilevel ul li.
Please help me I am very confused, I searched many time but no good result :(