如何在同一个项目中创建多个edmx [英] How to create multiple edmx in same project

查看:234
本文介绍了如何在同一个项目中创建多个edmx的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的EF ...
得到这个错误,同时在同一个项目
中添加另一个edmx使用相同的连接字符串。
这是我的连接字符串

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;" />


推荐答案

相同的连接字符串名称不允许,您可以多个连接字符串,但具有单独的名称。

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

更改

name =REFLECTIONDBEntities

To

name =REFLECTIONDBEntities2 / code>

name="REFLECTIONDBEntities2"

这篇关于如何在同一个项目中创建多个edmx的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆