1
Context:
The application has a module for record of calls and we use another application handle the incident record, both are in different database.
Each call can be related to one or more incidents and an incident may be related to one or more calls.
I’m using EntityFramework
in an application ASP. Net MVC
.
Soliciting
I need to link these calls to the incidents, I don’t see a way to do that because they’re from a different database.
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 relation(n:n)
?
You have the contexts of the two banks mapped in your solution?
– Leandro Angelo
I don’t, because they belong to different solutions.
– LP. Gonçalves
So I don’t quite understand what you want to do, so Atendimentoid and Incidenteid are just attributes without any integrity enhancement.
– Leandro Angelo
They are related, but not at the application level, but at the business level.
– LP. Gonçalves