How to create multiple edmx in same project

独自空忆成欢 提交于 2020-01-06 12:16:00

问题


i am new to EF ... getting this error while adding another edmx in same project using same connection string . this is my connection string

<add name="REFLECTIONDBEntities" connectionString="metadata=res://*/;provider=System.Data.SqlClient;provider connection string=&quot;data source=SERVER;initial catalog=REFLECTIONDB;persist security info=True;user id=sa;password=Sqlsa123;multipleactiveresultsets=True;application name=EntityFramework&quot;" />

回答1:


Same connection Strings Names are not allowed, you can have multiple Connection Strings but with separate names.

Change

name="REFLECTIONDBEntities"

To

name="REFLECTIONDBEntities2"



来源:https://stackoverflow.com/questions/24690891/how-to-create-multiple-edmx-in-same-project

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