none
VS 2019 .Net Core 2.1 missing Entity Framework Data Model missing RRS feed

  • Question

  • I have an azure database that I want to connect to and work with using .net core and VS 2019.

    Previously, I could connect to the Azure SQL DB by:

    1) Right click on created model folder
    2) select new item
    3) select entity data model
    4) select EF Designer from database
    5) connect to the database

    it would then build out the entity framework models for me (database first).

    In VS 2019, I had to nuget add entity framework core and design to the project, but it's still missing the ADO. net entity data model in the selection (there's nothing to do anything with EntityFramework listed).

    Anyone know how I can link to an existing DB in .net core 2.1 and VS 2019?

    Wednesday, April 3, 2019 3:39 PM

All replies

  • Anyone know how I can link to an existing DB in .net core 2.1 and VS 2019?

    https://www.learnentityframeworkcore.com/walkthroughs/existing-database

    Wednesday, April 3, 2019 8:34 PM
  • https://docs.microsoft.com/en-us/ef/core/get-started/aspnetcore/existing-db
    Tuesday, May 28, 2019 3:21 PM
  • this tutorial is code first NOT existing database.
    Sunday, October 13, 2019 7:37 PM
  • Really?  Command line to write a console app when the OP was clearly working in the UI
    Sunday, October 13, 2019 7:37 PM
  • @billpennock, you seem to not know how to implement EF Core  into a solution. Yes, you can go to the .NET Core command line to scaffold an EF Model from an existing database. It can also be done with Nuget Package Manager to scaffold an EF Model from an existing database. 

    It doean't matter if one is implementing EF Core into a UI project,  a classlib project a Web project a console project, etc. and ect., becuase it's the same procedure. That's all that's being shown, and one should be able understand what is happening and figure it out.

    > dotnet ef dbcontext scaffold "Server=.\;Database=AdventureWorksLT2012;Trusted_Connection=True;" Microsoft.EntityFrameworkCore.SqlServer -o Model

    EF Core and how to implement it is not like the previous versions of EF, there is no graphic EF Core model designer in Visual Stuido,  and there is no more EDMX in EF Core. Everything has to be scaffold in creating an EF Model. And in reality,  there is no EF Database first concept due to the scaffolding EF Core uses.

    The only graphical display of the EF Core Model is with the EF Power tools.

    https://marketplace.visualstudio.com/items?itemName=ErikEJ.EFCorePowerTools


    • Edited by DA924x Sunday, October 13, 2019 8:18 PM
    Sunday, October 13, 2019 8:16 PM
  • this tutorial is code first NOT existing database.
    Read my reply...
    Monday, October 14, 2019 1:24 AM
  • Really?  Command line to write a console app when the OP was clearly working in the UI
    Read my reply...
    Monday, October 14, 2019 1:24 AM
  • @DA924x

    Unless I'm missing something, you've gone on a tangent about EFCore when clearly OP is talking about Entity Framework 6 which includes all the modelling etc.

    Have you got something helpful to say around EF6 and Visual Studio 2019?

    Sunday, November 3, 2019 10:34 PM
  • @DA924x

    Unless I'm missing something, you've gone on a tangent about EFCore when clearly OP is talking about Entity Framework 6 which includes all the modelling etc.

    Have you got something helpful to say around EF6 and Visual Studio 2019?

    The OP is talking about EF Core for a Core version 2.1 Core project usage in VS2019 and the missing EF Data Model. The EF Data Model is not there when a EF Core project is selected and EF Core is being implemented into the project, which can only be done with EF Core model scaffolding.  

    The OP is not talking about EF6 being implemented into a Core project. And besides. non Core executables are not compatible with a Core project. The EF Data Model in VS2019 only works for a non Core project that is implementing EF6 in the project.

    If the OP was asking about EF 6, then I would talk about EF6. The OP is not asking about EF6.

    Monday, November 4, 2019 8:52 AM