How can I add Microsoft EF Core to a .Net Maui solution?

Bob Hanson 46 Reputation points
2023-08-15T21:27:56.8733333+00:00

What is the proper way to add Entity Framework Core to a .Net Maui solution?

I did try to use .Net console project, but that didn't seem to work.

I also tried to use a .Net Maui class project but that also didn't work.

Sorry if it is a pretty basic question,

Bob

Developer technologies | .NET | Entity Framework Core
Developer technologies | .NET | .NET MAUI
{count} vote

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 36,436 Reputation points Microsoft External Staff
    2023-08-16T09:59:11.6166667+00:00

    Hello,

    Please try adding Microsoft.EntityFrameworkCore.Sqlite in your MAUI project, then access SQLite, refer to the Xamarin tutorial- Getting Started with EF Core and Xamarin - EF Core | Microsoft Learn

    MAUI is the evolution of Xamarin.Forms, and the doc also applies to MAUI.

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.