479 questions
1 vote
0 answers
67 views
Microsoft.EntityFrameworkCore.Sqlite TOP and LIMIT SQL syntax error
In Entity Framework Core 9.0.9, the query builder fails with SQLite Syntax builder.Services.AddDbContext<MyDbContext>(fun options -> options.UseSqlite(connectionString) |> ignore It ...
0 votes
1 answer
86 views
How do I populate SQLite-net database with a base set of data?
I am very new to all of this (coding in general, C#, .NET MAUI, MVVM practices, SQLite) so excuse me if my inexperience shows. The context I have an app that has a database with a table Cars. To make ...
0 votes
0 answers
82 views
Unable to run SQLite-net on Mac catalyst in release mode, works fine in debug
I have a UNO platform application that is trying to use SQLite-net-pcl. While this seems to work fine in iOS in release mode in MacCatalyst in release mode i get the following error I am trying to ...
0 votes
0 answers
35 views
How can I force my own app to release a lock over its SQLite DB file?
I am working on a MAUI application which uses sqlite-net-pcl as its ORM. When I try to delete the DB file from the app (System.IO.File.Delete(dbFilePath)) I get the following exception on Windows: ...
3 votes
1 answer
805 views
.NET MAUI Entity Framework Core migration Issue when add new Tables and Rename
Here is necessary code segments in my program. My .NET project is .NET MAUI multiproject application. It has different projects for different platforms; WinUI, iOS, Maccatalyst, and Android too. I'm ...
0 votes
2 answers
204 views
How do I delete records from one table that are linked to another table through its PK?
I have a database in a Maui app that has two tables. The first table was setup with a class like this: public class Groups { [PrimaryKey, AutoIncrement] public long Id { get; set; } public ...
0 votes
0 answers
70 views
Sqlite is not saving new items after POST Request through ASP.NET Core
I've configured the ASP.NET Core Web API using controller to use Sqlite as the database, and after the request of adding new item, the item is not being saved to the database. The POST request ...
0 votes
0 answers
283 views
Trying to use Query<> command sqlite c# using sqlite-net-pcl but it doesn't run
I have the following method which is inside a database context class for a .NET MAUI project. I have tested the SQL query in a DBMS without an error, so know it should be working. Using Debug....
0 votes
2 answers
618 views
SQLite Exception on .net MAUI : no such table: matches
I'm trying to create a counter for a card game, and I'm trying to store the "Matches" with the points on a Database. I have installed the nuget package sqlite-net-pcl, and I'm getting the ...
1 vote
1 answer
238 views
Sqlite's [Ignore] not working with CommunityToolkit.Mvvm's [ObservableProperty]
I have a field in my Model that I want to [Ignore] during SqliteConnection.CreateTable<myModel> but I also use the CommunityToolkit.Mvvm [ObservableProperty] and this is causing an error for ...
0 votes
0 answers
273 views
Conflict between .NET Maui permissions and sqlite-net-pcl?
I am an amateur, trying to write an app that uses a sqlite database. I want the app to have read/write access to the Documents folder on my Android phone. However, I am having trouble with read/write ...
1 vote
1 answer
89 views
SQLite Expression Function with Trim raises an error
I have a database created with SQLite in my C# project. In a function, I like to filter the record in a table using Linq. For this reason, using this code for the And function, I wrote Expression<...
0 votes
0 answers
113 views
SQLite several tables with same data type?
Currently when I insert a new object in my database, it goes to the same table based on the data type. For example: sqlDatabase.Insert(myObject); // -> goes to MyObject table. Is it possible to ...
1 vote
0 answers
430 views
How can I fetch data to dynamic List of Table in Maui from Sqlite Database?
I want to fetch data from SQLite database in Maui using raw Query. But while trying this function I am getting error: >{System.ArgumentNullException: Value cannot be null. (Parameter 'type') at ...
2 votes
4 answers
1k views
SQLite cannot apply aggregate operator 'Sum' on expressions of type 'decimal'. Using LINQ to Objects to aggregate the results on the client side
Running the following code, there is an error in the OrdersPrice=g. Sum (p=>p.TotalPrice) line, Why? I want to query the sales data of the corresponding Managers for Orders within the past month, ...