Ambiguous column name 'name' error when scaffolding dbcontext

南笙酒味 提交于 2019-12-13 16:07:48

问题


I'm trying to scaffold from an existing database but the database has multiple tables with multiple schemas and some tables have the same names but within different schemas and i "think" this is the source of my problem and I was wondering if you've faced a similar scenario?

For example mySchema1.contacts and mySchema2.contacts in the same database.

Here is my command:

dotnet ef dbcontext scaffold "Data Source=database;Initial Catalog=table;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" Microsoft.EntityFrameworkCore.SqlServer --schema mySchema1, -t contacts -o Models

Here is my error:

Error Number:209,State:1,Class:16 Ambiguous column name 'name'.

来源:https://stackoverflow.com/questions/51103149/ambiguous-column-name-name-error-when-scaffolding-dbcontext

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!