# Entity Framework many to many joining table entity (CRUD OPERATION)

**URL:** <https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984>\
**Category:** Entity Framework\
**Created:** [September 7, 2022, 1:39pm UTC](https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984 "2022-09-07T13:39:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mtahaq](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mtahaq](https://forum.codewithmosh.com/u/mtahaq)\
**Post date:** [September 7, 2022, 1:39pm UTC](https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984/1 "2022-09-07T13:39:55Z")

</div>

Hello,  
I am new to Entity Framework, I wanna know how to add updates, or delete data from the Joining table which is automatically created from the code first approach when using many to many relationships between models. Please help me with this query

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [September 12, 2022, 3:52pm UTC](https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984/2 "2022-09-12T15:52:37Z")

</div>

Hi,  
Could you please provide a bit more context?

Are you using annotations to create tables of fluent API ?

Personally I rather use stored procedure to avoid working with many to many with EF.

Regards.

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [September 17, 2022, 5:06pm UTC](https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984/3 "2022-09-17T17:06:05Z")

</div>

Hi again.

I did spend a few hours on this last easy Saturday making a few demos from scratch.

Just read the code, clone the repo and have fun with the code.

There are also [notes](https://github.com/UchiTesting/UT-EFCore-MM-Demo/blob/master/md/Notes.md) on what happens in there.

Hope this helps.

Regards.

---

<div class="post-metadata">

**Author:** ![mtahaq](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@mtahaq](https://forum.codewithmosh.com/u/mtahaq)\
**Post date:** [September 21, 2022, 4:41pm UTC](https://forum.codewithmosh.com/t/entity-framework-many-to-many-joining-table-entity-crud-operation/14984/4 "2022-09-21T16:41:24Z")

</div>

I created two table with Many to many relationship that created one more table in db example i created student and courses and automatically studentscourses got created. I want to know to insert record in studencourses, how to edit any old record in studencourses and also delete e
