Quantcast
Channel: ADO.NET, Entity Framework, LINQ to SQL, NHibernate
Viewing all articles
Browse latest Browse all 1698

EF 6 to EF Core conversion

$
0
0

I'm converting a web app from .net framework to .net core.

We are using core 3.1 and ef core.

I am moving everything over and I keep seeing this error:

System.InvalidOperationException: Entity type 'Table' has composite primary key defined with data annotations. To set composite primary key, use fluent API. at

We actually do not need this table anymore, so I've removed EVERY reference of this, in the .cs file (entity) and the onModelCreating() method.

The error still shows up though!

Any ideas?

I even tried to keep it in the model and set the composite key via the fluent API.

I even removed the database fully from the sql server db and it still show!


Viewing all articles
Browse latest Browse all 1698

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>