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

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
726 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,244 questions
{count} vote

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 29,461 Reputation points Microsoft Vendor
    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