question

Mrnin-6674 avatar image
0 Votes"
Mrnin-6674 asked VladislavAntonyuk answered

sqlite-net-pcl One to many. MAUI

Hello, I wanted to use a SQL lite database. Soo I followed step by step your tutorial here: https://docs.microsoft.com/cs-cz/xamarin/get-started/quickstarts/database?pivots=windows .
I would like to use one to many annotation to create a relation between tables, but I am propably unable to do it with basic sqlite-net-pcl package. I found out, that many users use SQLiteNetExtensions to achive this goal, but I dont want to run into a problem, once we will have to port our xamarin apps to MAUI. Library SQLiteNetExtensions had last update from 2018 (3y ago). Is SQLiteNetExtensions library good for use nowadays ? Or do u recommend me to use EntityFramework ?

dotnet-xamarindotnet-sqlite
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Is [ForeignKey(nameof(xxxxx))] Valid for sqlite-net-pcl ?

0 Votes 0 ·

Hi, Mrnin-6674. The sqlite-net-pcl package doesn't support the ForeignKey, the feature is still unavailable. Here is the related link: https://github.com/praeclarum/sqlite-net/issues/100

1 Vote 1 ·

Do u recommend continue with sqlite-net-pcl or configure a Entity Framework then ?

0 Votes 0 ·
Show more comments
ttirrell avatar image
0 Votes"
ttirrell answered Mrnin-6674 commented

@Mrnin-6674 I have an enterprise application using Entity Framework with SQL Server and am working on mobile apps that I plan to use sqlite. Your mention of using Entity Framework with sqlite has me curious. How would you do that?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Check out links related to : "entity framework core sqlite"
NuGet link - https://www.nuget.org/packages/Microsoft.EntityFrameworkCore.Sqlite/

1 Vote 1 ·
VladislavAntonyuk avatar image
0 Votes"
VladislavAntonyuk answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.