hyankov
hyankov

Reputation: 4120

Move from SQL Server CE 4.0 + EF to SQLite

I have a .NET WPF project which is using SQL Server CE 4.0 with Entity Framework.

I want to rework it into a Xamarin Forms project. I think the 'migration' of the backend will be almost seamless, except for the data access layer. I am confused as to what Xamarin supports. I can't use SQL Server CE with Xamarin forms, can I? What about SQLite? It is supported, as far as I can tell.

Ok, but then what about ORM? Right now I am making a heavy use of the EF navigation properties. Is there any way I could preserve this with SQLite?

How would you go about converting code which relies on EF and navigation properties, backed by SQL Server CE, to SQLite, while preserving the mentioned navigation properties?

Can I use Entity Framework with SQLite, on Xamarin Forms?

Upvotes: 0

Views: 483

Answers (1)

ErikEJ
ErikEJ

Reputation: 41769

EF Core supports SQLite, yes.

And SQL Compact is supported with EF Core, but only on Windows desktop.

Support for EF Core with Xamarin Forms is still in progress, see this: https://learn.microsoft.com/en-us/ef/efcore-and-ef6/features

Upvotes: 1

Related Questions