Relating to using the fluent mapping API of Entity Framework Code first for configuring the SQL that gets generated on running migrations.
Questions tagged [ef-code-first-mapping]
93 questions
-1
votes
1 answer
Error while remove migration and update database entity framework core Exception while reading from stream
I am working in dotnet core web api using restful service with entity framework code first approach. I am running one migration and when I run the migration using add-migration command then I get build succeeded but then when I try to…

Rahul
- 156
- 2
- 21
-1
votes
2 answers
Mapping to model
How do I map join table data to a model in the code first approach with entity? I'd like to fetch the user info belonging to the chat message when i fetch chat messages. I'm getting the error
cannot type linq.iqueryable to collections.generic.list…

Stevie Wonder
- 119
- 1
- 1
- 9
-2
votes
1 answer
Set one to one and one to many both relationships among two tables
I have two tables called employee and team. I want to set relationships among the tables as follows.
employee belongs to a team. (1: m relationship).
team has a team leader (team leader is also an employee). (1:1 relationship)
employee…

Nipuna Hettiwatta
- 1
- 1
- 4