D
D
Denis2015-05-29 15:15:12
.NET
Denis, 2015-05-29 15:15:12

How to make a many-to-many relationship in EF CodeFirst with fields with unique values ​​for each relationship?

Two tables with entities
DataWorkbook {Id, Name, Type, Columns}
Column {Id, Name, CodeName, Workbooks }
And one table for relationships
DataWorkbook_Column {DataWorkbookId, ColumnId, ColumnIndex }
We get a unique ColumnIndex field for each relationship. Although, logically, this is an indicator of the Column entity in a good way.
But since I write a turn in c#, then the question is.
How to implement such a relationship in EntityFramework Code First??

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom, 2015-05-30
@artem_b89

www.entityframeworktutorial.net/code-first/configu...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question