I am working on an API web project, in ASP.net, and on the recommendation of several stackoverflow users, with a description of my problem, I have decided to use EntityFramework.
Work on a database already created, and formed, with all relationships. I have already generated all the corresponding entities, and do the first sql, to get a small example ql that will return all the data of a given table.
But when I get the query and execute it, I get the error 3002 with the following description:
error 3002: Problem in mapping fragments starting at line 12441:Potential runtime violation of table propuestaMarca's keys (propuestaMarca.marca, propuestaMarca.propuesta): Columns (propuestaMarca.propuesta, propuestaMarca.marca) are mapped to EntitySet propuestaMarca's properties (propuestaMarca.propuesta.cod_propuesta, propuestaMarca.marca.cod_marca) on the conceptual side but they do not form the EntitySet's key properties (propuestaMarca.marca.cod_marca, propuestaMarca.propuesta.cod_propuesta, propuestaMarca.propuesta.empresa).
When I review the .emdx model, I see the following:
The table propuestaMarca does not exist in the model. It is not exported correctly
When I review the .emdx model, I see the following:
The proposed tableBrand does not exist in the model. It is not exported correctly.
I have searched for information about error 3002, and I have found that removing a certain primary key from one of the two tables solves the problem, and had tried to eliminate the primary Empleado key in the propuesta table, but it has not worked.