VS 2015中数据源中缺少“实体数据模型” [英] “Entity data model” missing in datasources in VS 2015

查看:414
本文介绍了VS 2015中数据源中缺少“实体数据模型”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在新项目的数据源中添加实体数据模型。



当我点击添加新数据源时,数据源配置向导窗口会弹出并让我选择一个数据源类型,问题是实体数据模型不在列表中,只有数据库,服务,项目和sharepoint在列表中。



我应该做什么?



我尝试了什么:



我没有尝试任何因为我不知道该怎么做。

I want to add an "Entity Data Model" in data sources in a new project.

When I click "add new data source" the Data Source Configuration Wizard window will pop-up and will let me choose a data source type, the problem is the "Entity Data Model" is not in the list, only the database, service, project, and sharepoint is in the list.

What should I do?

What I have tried:

I tried nothing cause i dont know what to do.

推荐答案

实体数据模型是在这方面不是数据源。



如果我明白你的意思(如果我错了请纠正我)你首先需要添加一个空的数据模型你的解决方案。



在项目中,添加新项目,选择数据,然后选择数据模型类型。我使用T-SQL(MSSQL),因此我发现Linq to SQL Classes最容易使用。



我还集成了一个MySQL数据库。我使用EF 5.x DBContect Generator。它完全没错,但是完成了工作。您需要已经安装了MySQL连接器并通过NuGet添加实体框架。





使用Linq to SQL很简单,在Server Explorer中,创建数据库连接。通过Server Explorer浏览数据库,选择所需的任何表,视图和过程,并将它们拖放到空白dbml上。它将为你完成所有的课程和关系。



EF方法允许首先编码并生成数据库,反之亦然
Entity Data Model is not a Data Source in that respect.

If I get what you mean (and please correct me if I'm wrong) you first need to add an empty data model to your solution.

On the project, add new item, select data then choose the data model type. I use T-SQL (MSSQL) so I find "Linq to SQL Classes" easiest to use.

I also integrate a MySQL database. I use the EF 5.x DBContect Generator. It's buggy as all hell but gets the job done. You will need to have already installed the MySQL connectors and add the Entity Frameworks via NuGet.


Using the Linq to SQL is easy, in Server Explorer, create a db connection. Explore the database via the Server Explorer, select any tables, views, procs you want and drag-drop them onto your blank dbml. It'll work out all the classes and releationships for you.

The EF approach allows to to code first and produce a database and vise-versa


这篇关于VS 2015中数据源中缺少“实体数据模型”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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