UWP database designer for SQLite - visual-studio

I am following this tutorial and it seems you have to build all the relationships manually.
Is there any database visualizer/designer for visual studio which will help you to easily create an SQLite database?
Something like this one:

TL;DR: Currently there's no official support in UWP to create your database from a designer AND have both the SQL and C# code generated.
If you're using EF Core with code first as done in the tutorial you're following, then there's no designer to help. After all it is 'code first' not designer first.
If you really want to design your database, you can use ErikEJ's Visual Studio Extension called SQLite / SQL Server Compact Toolbox . This will help you to design the database, but then you won't have a way to generate the C# DBContext and Entity classes for UWP, as UWP only supports EF Core (not EF 6).
So you'll either have to write the models yourself after designing the database and you're back at step 1 (so what's the use of using a visual designer), or write SQL queries yourself using SQLite.NET-PCL or any other SQLite NuGet package.

Related

Visual Studio for Mac add ADO.NET Entity Data Model template

How would I add the ADO.NET Entity Data Model template to my WebApi project in Visual Studio for Mac?
In Mac, to add a Data Model using the DataFirst technique you need to use the scaffold command.
https://www.learnentityframeworkcore.com/walkthroughs/existing-database
In the above blog, this process is explained neatly.

Where is the EDM tool in Visual Studio 2013 Ultimate Trial?

I just installed VS 2013 Ultimate Trial and I noticed there is no EDM option as shown in the following figure.
Why?
According to ADO.NET Blog, the tool should be available out of the box.
From Visual Studio 2013 onwards we will no longer include the extension that enables configuring an "EDM" data source in this way, e.g. if you add an .MDF file to a project you will no longer see the option to create an EF model, and the option of creating an "EDM" data source based on an existing EDMX model as well as the ability to drag and drop to create data-bound controls automatically in WPF application based on those "EDM" data sources are no longer included.
The recommended ways to create an EF model are either creating the classes,manually (Code First) or adding a new "ADO.NET Entity Data Model" using Add New Item.
The recommended way to do data binding against EF models in WPF applications is through use regular object data sources as explained in this walkthrough.

Entity Designer Database Generation Power Pack not working in VS2012

I was developing MVC3 web site using VS2010 and for model generation i used EF 5.0 and for database generation i used Entity Designer Database Generation Power Pack (model first approach).
Now i m shifting from VS2010 to VS2012 for same project and need to edit my entity model so i added new entity in my edmx file and i'm going to generate my database using my entities then it is showing me error generate migration t-sql and deploy.xaml not exits .
I'm googling for this but not yet get solution.
How to resolve this issue ?
Entity Designer Database Generation Power Pack is not supported on VS2012.

Table Valued Functions in EDMX with Entity Framework 5 / Visual Studio 2010

If it possible to use table valued functions in an EDMX with Entity Framework 5 RC / Visual Studio 2010?
I cannot see the option in the EDMX designer, I have a feeling that the designer is in .net 4.5? Are my suspicions correct? Or perhaps in Visual Studio 11?
I'm not really in a position to be able to upgrade our project to .net 4.5 yet, is there another way of using table valued functions (perhaps modifying the edmx by hand?).
ADDITIONAL INFO:
This blog post on msdn helps confirm the incompatibility:
Some features are only available when writing an application that
targets .NET 4.5. This includes enum support, spatial data types,
table-valued functions and the performance improvements. If you are
targeting .NET 4.0 you still get all the bug fixes and other minor
improvements.
However interestingly, this tutorial discuses modifying the EDMX directly to add support for TVF, but it appears to be for a an old beta. The XML intellisense also didn't find the elements discussed in the tutorial, but it might be because it was using a different schema. Unfortunately I've run out of time to try and apply the tutorial to the new EF5 Release candidate, but I'd be interested in knowing if anyone has had any luck.
Unfortunately table valued function support is currently dependent on .NET 4.5 and VS 2012.
I have been using this approach in order to use table-valued functions from EF 4. Basically it includes hand-editing the EDMX file. The downside to that approach is that you need to edit the file manually whenever you update your model.

How to find dbcontext template in Visual Studio 11

I'm using database first approach to create a model with entity framework. In VS2010 after the model was generated I always choose a different code generation template (right click on diagram "Add new code generation item") then, in the dialog box, choose "DbContext Generator". This will instruct VS to generate POCO classes instead of the, very complex, standard class. When I tried to do the same in the Visual Studio 11 Developer Preview I can't find the template "DbContext Generator" in the dialog.
How can I add the dbcontext template to the Visual Studio 11 Developer Preview?
I saw I can use nuget but I'm unable find it when I do a search.
Can you add the Entity Framework Power Tools via the Extension Manager? Then in a class library, you can right-click and "Reverse Engineer Code First". That will pull your database in and create everything you need (no need for EDMX and TT files). You will need to have EF 4.1 installed or have added the EntityFramework NuGet package to your project before running reverse engineer.
I don't have VS 11 installed here, so can't check if the tools will install (I'm also not sure whether these features are being rolled into 11) but anyway will work great in 2010 as I frequently use it.
Richard
In February Microsoft release a dbContext Generator that works on Visual Studio 11 Beta.
The link to download this generator is:
http://visualstudiogallery.msdn.microsoft.com/da740968-02f9-42a9-9ee4-1a9a06d896a2?SRC=VSIDE
Hope it helps.

Resources