Модель ado net edm как добавить в vs
ADO.NET edm отсутствует в Visual Studio
Во-первых, ADO.NET EDM доступна не для всех проектов в VS (во всяком случае, сразу). Обратите внимание, какой проект вы создаете. Например:
Не удается найти шаблон модели данных объекта ADO.net в VS2017
- Установка Entity Framework 6.x через NuGet
- Установка пакета вручную, дважды щелкнув последний файл msi
- Изменение версии .NET с 4.6.x на 3.5
- Перейти к инструментам — > Получить инструменты и функции
- Выберите вкладку «Индивидуальные компоненты» и проверьте инструменты Entity Framework 6 в разделе «SDK», «Библиотеки» и «Структура»
- Установите Core 2.0 SDK и NuGet, которые знают о .NET Standard 2.0
- Используйте проект .NET 4.x, а не Core
От Microsoft:
Отсутствует возможность добавления Модель данных ADO NET EDM в Visual Studio в проекте net core
ADO.NET EDM SQLite
Хотел добавить в ADO.NET EDM своё подключение базы SQLite, но там её не оказалось, прочитал про.
Можно ли использовать сборку из .NET Core в обычном ASP .NET проекте ?
Microsoft.Extensions.Logging очень удобная штука, в обычном .NET её никак нельзя задействовать .
Объединить .net core и .net framework в одном проекте
Всем привет, требуется объединить .net core 3.0 (wpf) и .net framework (В идеале: 4.5.2 , но можно.
Net Core 1.0 в Visual Studio 2019
Приветствую, ребята. Подскажите пожалуйста, как в VS-2019 создать ASP Net Core 1.0 приложение .
Установка Net Core на Visual Studio 2015
Приветствую, ребята! Подскажите пожалуйста, какие пакеты нужно установить в VS-2015 чтобы можно.
Модель ado net edm как добавить в vs
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
All replies
Please open VS installer and confirm the component «Entity Framework 6 tools» has been installed?
MSDN Community Support
Please remember to click «Mark as Answer» the responses that resolved your issue, and to click «Unmark as Answer» if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
- Edited by Kyle Wang — MSFT Microsoft contingent staff Tuesday, September 24, 2019 2:49 AM
- Proposed as answer by Saleem Yusuf Sunday, January 12, 2020 11:24 PM
I have Entity Framework 6 Tools enabled in VS2019 Community Edition — but still no ADO.NET or any other SQL or other data connection choices in the Visual C#/data section; I used the installer to upgrade today to the latest release.
All I get is three choices for adding a new item in data:
JSON Schema File
So cannot install a database connection to include database in project — help urgently pls!
I have Entity Framework 6 Tools enabled in VS2019 Community Edition — but still no ADO.NET or any other SQL or other data connection choices in the Visual C#/data section; I used the installer to upgrade today to the latest release.
All I get is three choices for adding a new item in data:
JSON File
JSON Schema File
XML File
So cannot install a database connection to include database in project — help urgently pls!
I didn’t do anything special in installing VS2019 Community. Maybe the install on your machine is bad.
Oh, I just realised where is the problem!
I had the same thing, couldn’t find ADO.NET entity data model!
However what we probably have in common is that we opened «windows desktop app» instead of «windows form app»!
So after I opened new windows form app the ADO.NET entity data model appeared!
Hope this helps!
- Proposed as answer by AQEELA UROOJ Sunday, January 12, 2020 6:09 PM
I had the same problem when tried to create a model under App_Data.
However, when I try the same under the project I get the option!
- Proposed as answer by Saleem Yusuf Sunday, January 12, 2020 11:25 PM
I had the same issue, ADO.NET Entity Data Model would not show in a Console .NET Core project. I then delete this project and created a Console .NET Framework project and now I see ADO.NET Entity Data Model plus 8 other template. I have Visual Studio 2019 Enterprise.
M. Saleem Yusuf
EF Core uses Dbcontext scaffolding from the .NET Core Command Prompt or through the Nuget Package Manager Console. So there is no ADO.NET Entity Data Model that is ever going to show in Visual Stuido for a Core project of any type that will implement the ADO.NET Core Entity Framework based on model creation.
- Proposed as answer by Saleem Yusuf Sunday, January 12, 2020 11:25 PM
- Proposed as answer by Misaghfar Saturday, March 21, 2020 12:25 PM
I had same problem and I just stumbled upon this post. Just wanted to share my two cents. I guess it’s something to do with way how .net standard library has been implemented instead of earlier Base class library. So For example when you look at class library(.net standard) that is referencing by default to SDK. So template available for these project is different. Ado.net as template is not available to class library project but is there let’s say for WebApi projects. Take a class library or project that refer to .net framework and you should be fine. Choose first Class lib and you will see Ado.net chosse second option and you don’t see it
- Edited by Rohit Sakalle Sunday, March 29, 2020 3:26 PM
- Proposed as answer by Rohit Sakalle Sunday, March 29, 2020 3:27 PM
One can install the PowerTools that has Reverse Engineering graphical interface that can be pointed at an existing database and select the tables to build the EF Model with a Visual Stuido project.
Visual Studio 2010 Beta 2 и модель данных сущности ADO.NET
Я только что установил бета-версию VS2010 Ultimate и не могу найти шаблон модели данных сущности ADO.NET. У меня создалось впечатление, что он установлен, может ли кто-нибудь исправить это или указать, где я могу его найти? Спасибо.
3 ответы
Я запускал Visual Studio 2010 Ultimate и не мог найти мастер модели данных сущности, поэтому я установил Visual Studio 2010 Premium и вуаля, теперь у меня есть мастер модели данных сущности.
Создан 09 июля ’10, 23:07
Для всех, кто просматривает этот вопрос, я понял, почему. У меня есть VS2010 Ultimate Beta 2, и я обнаружил, что модель данных сущности ADO.NET не включена или никогда не будет включена.
Мне сказали, что VS2010 Premium с менее функциональными возможностями имеет модель данных сущности ADO.NET.
EDIT:
Я удалил Ultimate и на полпути к установке версии Premium мой коллега заверил меня, что мы не будем использовать EDM, поэтому я повторно установил Ultimate (еще раз), и теперь он там. Всем, у кого есть эта проблема, попробуйте то, что я сделал.
Это странно. У меня установлена beta 2 ultimate, и я могу добавить элемент ADO.NET EDM в свои проекты. — Бен М
Интересно. Щелкните правой кнопкой мыши на Models -> Add New Item, затем выберите Data, его там? Интересно, почему не обнаруживаются мины. У меня была проблема с VS2008, но когда я загрузил пакет обновления, вуаля, он был там. — Энтони Форлони
Я думаю, это может иметь какое-то отношение к типу проекта, в который вы добавляете элемент. У меня были некоторые проблемы, когда я впервые установил так, что переустановил, фактически ничего не пробуя.
Когда я сначала хотел добавить модель в проект библиотеки классов, я сначала не мог ее найти, но затем я попытался добавить модель в существующий проект WCF, и она внезапно появилась. Затем я вернулся к своему библиотечному проекту и да! это тоже было там.
Не уверен, что вызвало это, или поможет ли это читателям, но вот он, мой опыт с 2010 и EDM .
ADO.NET модель данных сущности отсутствует сообщество Visual Studio 2015
Я начинаю новый ASP.NET 5 шаблон предварительного просмотра, чтобы играть с развитием на стороне клиента.
у меня есть база данных ( MS SQL), к которой я хочу получить доступ с помощью веб-API и Entity Framework.
в своем Models Папка я делаю, как я привык делать, добавить новый элемент, и я хочу добавить ADO.NET Entity Data Model но его там нет.
что я пропустила?
обновление
это единственное, что я вижу, когда я пытаюсь добавить новый элемент в проект. Сторона клиента и сторона сервера.
5 ответов
после многих исследований я обнаружил, что есть некоторые проблемы совместимости, которые возникают из недавней миграции Microsoft в мир с открытым исходным кодом (начиная с Asp.net5), который я получил от точки данных-EF6, EF7 и ASP.NET 5 Суп статья MSDN. Прочитайте полную статью, пожалуйста.
так если вы хотите иметь EF6 и Asp.net5, рассмотрим советы по статье. И если вы не упорствуете в использовании Asp.net5, просто используйте Asp.net4.5 (следующее изображение) которые имеют Ado.net Модель Данных на Добавить Новый Элемент dialog (я проверил его доступность с помощью Visual Studio Enterprise).
- щелкните правой кнопкой мыши на project
- выберите Добавить, а затем новый элемент (или просто нажмите Ctrl+Shift+A)
- вы увидите раздел данных, который вы можете найти то, что вы ищете
может показаться глупым, но так как меня поймали с этим, это может быть чья-то еще проблема.
в VS 2015 Есть 2 шаблона проекта, называемые библиотекой классов. в Windows и в интернете, и имеющие (пакет) суффикс. По-видимому, кроме вводящего в заблуждение названия они не имеют ничего общего друг с другом, а второй явно не предназначен для поддержки моделей EF. Убедитесь, что вы создали правильный тип проекта или открыли рабочее решение с разными VS версия.
также это может помочь. У меня он уже установлен, поэтому не уверен, влияет ли он на мою конфигурацию или нет (не следует, поскольку инструменты EF должны поставляться уже с VS 2015):
создать новый проект MVC с помощью VS2015
- щелкните правой кнопкой мыши на папке Model.
- выберите Добавить, а затем выберите класс из списка.
- Теперь выберите ADO.Net модель данных сущности. и иди за своим выбором.
ADO.NET модель данных сущности отсутствует сообщество Visual Studio 2017
открыть установщик Visual Studio — > отдельные компоненты — > SDK, библиотеки и фреймворки — > включить инструменты EntityFramework 6 — > изменить
Name already in use
visualstudio-docs / docs / data-tools / create-a-simple-data-application-by-using-adonet.md
- Go to file T
- Go to line L
- Copy path
- Copy permalink
- Open with Desktop
- View raw
- Copy raw contents Copy raw contents
Copy raw contents
Copy raw contents
Create a simple data application by using ADO.NET
When you create an application that manipulates data in a database, you perform basic tasks such as defining connection strings, inserting data, and running stored procedures. By following this topic, you can discover how to interact with a database from within a simple Windows Forms «forms over data» application by using Visual C# or Visual Basic and ADO.NET. All .NET data technologies—including datasets, LINQ to SQL, and Entity Framework—ultimately perform steps that are very similar to those shown in this article.
This article demonstrates a simple way to quickly get data out of a database. If your application needs to modify data in non-trivial ways and update the database, you should consider using Entity Framework and using data binding to automatically sync user interface controls to changes in the underlying data.
[!IMPORTANT] To keep the code simple, it doesn’t include production-ready exception handling.
[!NOTE] The complete code for this tutorial can be accessed in the Visual Studio docs GitHub repo in C# and Visual Basic.
To create the application, you’ll need:
SQL Server Express LocalDB. If you don’t have SQL Server Express LocalDB, you can install it from the SQL Server download page.
This topic assumes that you’re familiar with the basic functionality of the Visual Studio IDE and can create a Windows Forms application, add forms to the project, put buttons and other controls on the forms, set properties of the controls, and code simple events. If you aren’t comfortable with these tasks, we suggest that you complete the Create a Windows Forms app in Visual Studio with Visual Basic tutorial or the Create a Windows Forms app in Visual Studio with C# tutorial before you start this walkthrough.
Set up the sample database
Create the sample database by following these steps:
In Visual Studio, open the Server Explorer window.
Right-click on Data Connections and choose Create New SQL Server Database.
In the Server name text box, enter (localdb)\mssqllocaldb.
In the New database name text box, enter Sales, then choose OK.
The empty Sales database is created and added to the Data Connections node in Server Explorer.
Right-click on the Sales data connection and select New Query.
A query editor window opens.
Copy the Sales Transact-SQL script to your clipboard.
Paste the T-SQL script into the query editor, and then choose the Execute button.
After a short time, the query finishes running and the database objects are created. The database contains two tables: Customer and Orders. These tables contain no data initially, but you can add data when you run the application that you’ll create. The database also contains four simple stored procedures.
Create the forms and add controls
Create a project for a Windows Forms application, and then name it SimpleDataApp.
Visual Studio creates the project and several files, including an empty Windows form that’s named Form1.
Add two Windows forms to your project so that it has three forms, and then give them the following names:
Navigation
NewCustomer
FillOrCancel
For each form, add the text boxes, buttons, and other controls that appear in the following illustrations. For each control, set the properties that the tables describe.
[!NOTE] The group box and the label controls add clarity but aren’t used in the code.
Navigation form
NewCustomer form
FillOrCancel form
Store the connection string
When your application tries to open a connection to the database, your application must have access to the connection string. To avoid entering the string manually on each form, store the string in the App.config file in your project, and create a method that returns the string when the method is called from any form in your application.
You can find the connection string by right-clicking on the Sales data connection in Server Explorer and choosing Properties. Locate the ConnectionString property, then use Ctrl+A, Ctrl+C to select and copy the string to the clipboard.
If you’re using C#, in Solution Explorer, expand the Properties node under the project, and then open the Settings.settings file. If you’re using Visual Basic, in Solution Explorer, click Show All Files, expand the My Project node, and then open the Settings.settings file.
In the Name column, enter connString .
In the Type list, select (Connection String).
In the Scope list, select Application.
In the Value column, enter your connection string (without any outside quotes), and then save your changes.
. image type=»content» source=»media/vs-2022/simple-data-app-settings.png» alt-text=»Screenshot of Connection String in Settings.settings» lightbox=»media/vs-2022/simple-data-app-settings.png».
[!NOTE] In a real application, you should store the connection string securely, as described in Connection strings and configuration files.
Write the code for the forms
This section contains brief overviews of what each form does. It also provides the code that defines the underlying logic when a button on the form is clicked.
The Navigation form opens when you run the application. The Add an account button opens the NewCustomer form. The Fill or cancel orders button opens the FillOrCancel form. The Exit button closes the application.
Make the Navigation form the startup form
If you’re using C#, in Solution Explorer, open Program.cs, and then change the Application.Run line to this: Application.Run(new Navigation());
If you’re using Visual Basic, in Solution Explorer, open the Properties window, select the Application tab, and then select SimpleDataApp.Navigation in the Startup form list.
Create auto-generated event handlers
Double-click the three buttons on the Navigation form to create empty event handler methods. Double-clicking the buttons also adds auto-generated code in the Designer code file that enables a button click to raise an event.
[!NOTE] If you skip the double-click action in the designer and just copy the code and paste it into your code files, don’t forget to set the event handler to the right method. You can do this in the Properties window. Switch to the Events tab (use the lightning bolt toolbar button) and look for the Click handler.
Add code for the Navigation form logic
In the code page for the Navigation form, complete the method bodies for the three button click event handlers as shown in the following code.
. code language=»csharp» source=»../data-tools/codesnippet/CSharp/SimpleDataApp/Navigation.cs» .
. code language=»vb» source=»../data-tools/codesnippet/VisualBasic/SimpleDataApp/Navigation.vb» .
[!NOTE] The code for this tutorial is available in C# and Visual Basic. To switch the code language on this page between C# and Visual Basic, use the code language switcher at the top of the page on the right side.
When you enter a customer name and then select the Create Account button, the NewCustomer form creates a customer account, and SQL Server returns an IDENTITY value as the new customer ID. You can then place an order for the new account by specifying an amount and an order date and selecting the Place Order button.
Create auto-generated event handlers
Create an empty Click event handler for each button on the NewCustomer form by double-clicking on each of the four buttons. Double-clicking the buttons also adds auto-generated code in the Designer code file that enables a button click to raise an event.
Add code for the NewCustomer form logic
To complete the NewCustomer form logic, follow these steps.
Bring the System.Data.SqlClient namespace into scope so that you don’t have to fully qualify the names of its members.
Add some variables and helper methods to the class as shown in the following code.
. code language=»csharp» source=»../data-tools/codesnippet/CSharp/SimpleDataApp/NewCustomer.cs» .
. code language=»vb» source=»../data-tools/codesnippet/VisualBasic/SimpleDataApp/NewCustomer.vb» .
Complete the method bodies for the four button click event handlers as shown in the following code.
. code language=»csharp» source=»../data-tools/codesnippet/CSharp/SimpleDataApp/NewCustomer.cs» .
. code language=»vb» source=»../data-tools/codesnippet/VisualBasic/SimpleDataApp/NewCustomer.vb» .
The FillOrCancel form runs a query to return an order when you enter an order ID and then click the Find Order button. The returned row appears in a read-only data grid. You can mark the order as canceled (X) if you select the Cancel Order button, or you can mark the order as filled (F) if you select the Fill Order button. If you select the Find Order button again, the updated row appears.
Create auto-generated event handlers
Create empty Click event handlers for the four buttons on the FillOrCancel form by double-clicking the buttons. Double-clicking the buttons also adds auto-generated code in the Designer code file that enables a button click to raise an event.
Add code for the FillOrCancel form logic
To complete the FillOrCancel form logic, follow these steps.
Bring the following two namespaces into scope so that you don’t have to fully qualify the names of their members.
Add a variable and helper method to the class as shown in the following code.
. code language=»csharp» source=»../data-tools/codesnippet/CSharp/SimpleDataApp/FillOrCancel.cs» .
. code language=»vb» source=»../data-tools/codesnippet/VisualBasic/SimpleDataApp/FillOrCancel.vb» .
Complete the method bodies for the four button click event handlers as shown in the following code.
. code language=»csharp» source=»../data-tools/codesnippet/CSharp/SimpleDataApp/FillOrCancel.cs» .
. code language=»vb» source=»../data-tools/codesnippet/VisualBasic/SimpleDataApp/FillOrCancel.vb» .
Test your application
Run the application and try creating a few customers and orders to verify that everything is working as expected. To verify that the database is updated with your changes, open the Tables node in Server Explorer, right-click on the Customers and Orders nodes, and choose Show Table Data.