First, you should configure app constants. Configuration data, such as database filename and path, can be stored as constants in your app.
Then, you can create a database access class, and this is the solution for connecting DAL to .NET Maui. A database wrapper class abstracts the data access layer from the rest of the app. This class centralizes query logic and simplifies the management of database initialization, making it easier to refactor or expand data operations as the app grows. The SQLite.NET library provides a simple Object Relational Map (ORM) that allows you to store and retrieve objects without writing SQL statements.
Finally, you can access data smoothly. You can register your pages and the database access class as services on the IServiceCollection object, in MauiProgram.cs, with the AddSingleton and AddTransient methods.
For more details about these steps, you can refer to the document: https://learn.microsoft.com/en-us/dotnet/maui/data-cloud/database-sqlite?view=net-maui-7.0.