Connection table not mapping to object

c# entity-framework entity-framework-6

Question

Users in my database, which has a Users table, can have friends. In my Content table, which has a UserId as a foreign key, users produce content. Everything is well thus far. One entity is made for Users, while the other is made for Content via Entity Framework. Additionally, the Users entity has navigation to a collection of contents (ont user can have many Content records).

In order to allow people to "Like" material, I made another new table. I therefore have a ContentId and a UserId in my ContentLikes database (as a foreign key for my users table) (as a foreign key for the contents table). My issue is that Entity Framework doesn't map such objects in any way; I don't see a navigation property or an entity for likes in the contents entity.

EF informs me that the table is already mapped when I attempt to add it.

What do I not see here?

Update:

In the mistakes, I observe the following:

Error 6004: The table 'ContentLikes' is referenced by a relationship, but cannot be found.

1
1
3/31/2016 4:35:43 AM

Popular Answer

ZZZ_tmp
3
10/13/2014 11:35:50 AM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow