如何配置实体框架模型...... [英] how to configure entity framework model ...

查看:63
本文介绍了如何配置实体框架模型......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我创建实体框架时,它显示如下的错误。

如何解决这个错误。

请帮我解决这个错误。



when i creating entity framework then it is showing error like below.
how can i solve this error.
Please help me to solve this error.

Could not parse the configuration file. The error message is: 'The 'data source' keyword is not supported.'. Try editing the file manually and then saving it.
Generated model file: treModel.edmx.
Loading metadata from the database took 00:00:02.5454278.
Generating the model took 00:00:02.2199717.
Unable to update the Web.Config file because of the following exception: 'The 'data source' keyword is not supported.'
Successfully registered the build provider in the Web.Config file.
Writing the .edmx file took 00:00:00.0084904.
Generated model file: treModel.edmx.
Loading metadata from the database took 00:00:02.9408819.
Generating the model took 00:00:01.2660688.
Unable to update the Web.Config file because of the following exception: 'The 'data source' keyword is not supported.'
Successfully registered the build provider in the Web.Config file.
Writing the .edmx file took 00:00:00.0087412.

推荐答案

我的实体连接字符串是: -



< add name =treEntitiesconnectionstring =metadata = metadata = res://*/App_Code.treModel.csdl | res://*/App_Code.treModel。 ssdl | res://*/App_Code.treModel.msl; provider = System.Data.SqlClient; provider connection string ='Data Source = localhost; Initial Catalog = Tre; Integrated Security = True; Connection Timeout = 60; multipleactiveresultsets = true 'providername =System.Data.EntityClient>
My Entity Connection String is:-

<add name="treEntities" connectionstring="metadata=metadata=res://*/App_Code.treModel.csdl|res://*/App_Code.treModel.ssdl|res://*/App_Code.treModel.msl;provider=System.Data.SqlClient;provider connection string='Data Source=localhost;Initial Catalog=Tre;Integrated Security=True;Connection Timeout=60;multipleactiveresultsets=true'" providername="System.Data.EntityClient">


这篇关于如何配置实体框架模型......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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