Create a Crud with a table with relationship N to N C#

Asked

Viewed 76 times

0

inserir a descrição da imagem aqui

I have this structure and wanted to know how I do a CRUD with a relationship N-> N My doubts : 1 - How to list participants of a given event. 2 - How to include a participant in an event.

  • share how you set up the entities and dbset of that structure in EF

  • public partial class Eventoparticipante { public int Id { get; set; } public int Idevento { get; set; } public int Idparticipante { get; set; } public virtual Event Ideventonavigation { get; set; } public virtual Participant Idparticipantenavigation { get; set; } } public virtual Dbset<Eventoparticipante> Eventoparticipante { get; set; }

  • edit the question with this information

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.