Context:
The application has a module for logging of calls and we use another application to deal with the record of incidents, both are in different databases.
Each care may be related to one or more incidents and an incident may be related to one or more care.
I'm using EntityFramework
in an application ASP. Net MVC
.
Request
I need to associate these requests with the incidents, I do not see a way to do this because they are from different databases.
I thought about doing something like this, but I'm not sure about being a good solution:
[Table("AssociacaoAtendimentoIncidente")]
public class AssociacaoAtendimentoIncidente
{
public int AtendimentoId { get; set; } //Pertence ao banco de dados atual.
public int IncidenteId { get; set; } //Pertence a outro banco de dados.
}
How to create a table that represents this (n:n)
? relationship