1

Note: answer to this question can be found in the comments below.

Using VS 2017 community (VS), I created a project as follows:

  • New Project -> C# Windows Universal -> Blank App (i.e. a UWP project)
  • Installed NuGet packages:
    • Microsoft.EntityFrameworkCore.Sqlite
    • Microsoft.EntityFrameworkCore.Tools

After that, I can successfully create a new SQLite database via a code-first Entity Framework (EF) initial database migration.

What I'd like to do, however, is use a model-first approach by doing an Entity Relationship Diagram (ERD) of the database in VS. Note that I can do this in a non-core/non-UWP project with EF (non-core) packages by doing

Project -> Add New Item -> Visual C# Items -> Data -> ADO.Net Entity Data Model

which results in a drawing canvas where you can create an ERD which can then be used to generate the DB and ORM code. But this does not work in my UWP project because the "add new item" dialog has no "ADO.Net Entity Data Model" entry under the Data section.

Am I missing something? A NuGet package? Or am I just looking in the wrong place? Or is model-first via ERD not possible for EF core?

Note: I'm very new to the MS technology stack, so I hope I'm using the correct names for things. I've seen a few other questions on SO that may be related to my question, but my lack of familiarity with the terms makes me unsure of that. Further, none of those other questions seem to contain the steps I described above.

ETA: Someone flagged my question as a possible duplicate of this question. I agree in that the answer to the other question is ultimately applicable to my question. However, I think I saw that question while searching before I posted my question but, due to my lack of knowledge regarding MS tech, was unable to know for sure if it was applicable or not. E.g., it talks about Asp.net and MVC core, but says nothing about .net core and UWP. They may well equate to the same thing for someone who knows what all the various names mean, but not for me and not, I suspect, for other newbies like me. If someone is trying to do what I am in VS 2017, then my question will be more applicable. Just my two cents.

4
  • Possible duplicate of ADO.NET entity data model (.edmx) in ASP.NET MVC core 1.0 Commented Sep 24, 2017 at 18:26
  • 1
    Entity Framework Core doesn't support EDMX, so what you try to do is not possible. Commented Sep 24, 2017 at 18:27
  • EF-core dropped edmx, but see learn.microsoft.com/en-us/ef/core/extensions LLBLGen and Devart. Commented Sep 24, 2017 at 18:29
  • Thank magicandre and gert! I did download a trial of Devart and am still evaluating. One thing I can say is that devart did not show up in "add new item" for a .net core UWP project (it does show up for .net, non-UWP). I haven't yet tried to use the standalone devart tool and then somehow import its results to a UWP project, though the devart webpage says EF core is supported, so there must be some way to do it. Commented Sep 25, 2017 at 1:14

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.