1

I am starting to learn UWP platform. In first steps I want to do simple application (bookshop). Unfortunately, I got stuck on steps: how to use Entity Framework with SQL Server in UWP?

First I was using

Install-Package Microsoft.EntityFrameworkCore.SqlServer

but I got lots of conflicts (ex. System.Threading.Thread 4.3.0 error, or One or more packages are incompatible with UAP,Version=v10.0 (win10-x86).).

After that, I was trying add a classic dll to project (and install ef), but... classic library are incompatible with UWP...

Do you have any idea how to use EF with SQL Server in UWP ? I don't want to use sqlite...

1

4 Answers 4

5

Sorry you can only use the entity framework SQLite provider with UWP.

Sign up to request clarification or add additional context in comments.

1 Comment

I have tried to install Install-Package Microsoft.EntityFrameworkCore.SqlServer in my UWP application but encountered the same issues. I guess it's still in infancy stage to use EF Core.SqlServer, but Microsoft.EntityFrameworkCore.SqlLite works.
0

The latest version of Windows SDK (Falls Creators Update) will support direct SQL Server connection. Have a look at it here: https://learn.microsoft.com/en-us/windows/uwp/data-access/sql-server-databases

1 Comment

The question asks about EF and the article says nothing about EF. If I posted a short answer like that then I would get voted down.
0

To use SQLite in your UWP app, you need to target Windows 10 Fall Creators Update (10.0; Build 16299)

The NuGet packages are:

  • Microsoft.EntityFrameworkCore.Sqlite
  • Microsoft.EntityFrameworkCore

Comments

0

I successfully connected ms sql, entity framework to uwp. They work together.

To connect, I used an additional project "csproj" with the standard .NetStandard 2.0 in the same solution. I also used "Microsoft.EntityFrameworkCore.SqlServer" in this project, not in the UWP project. It was just class library

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

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.