on-internet
← Community

.NET Core scaffold-dbcontext - 2 dbcontexts can't add duplicate table names

Stack Overflow ·

I have a .NET Core 3.1 application with 2 dbcontexts. Each points to their own, separate, databases. However, both databases have a couple of tables with the same name: Database1 tables (Job and General) Database2 tables (Job and General) I have already added these tables for dbContext1: Scaffold-DbContext "Server=ipaddress;Database=Database1;" Microsoft.EntityFrameworkCore.SqlServer -OutputDir Data -Tables "Job","General" -Context dbContext1 Now when I try to add these tables for dbContext2 it overwrites the entities created for dbContext1: Scaffold-DbContext "Server=ipaddress;Database=Databa

Comments

Sign in or sign up to comment and upvote.

No comments yet.