Xamarin.SqliteORM
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Xamarin.SqliteORM --version 1.0.0
NuGet\Install-Package Xamarin.SqliteORM -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Xamarin.SqliteORM" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xamarin.SqliteORM" Version="1.0.0" />
<PackageReference Include="Xamarin.SqliteORM" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xamarin.SqliteORM --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xamarin.SqliteORM, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Xamarin.SqliteORM@1.0.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xamarin.SqliteORM&version=1.0.0
#tool nuget:?package=Xamarin.SqliteORM&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SqliteORM
A cross platform wrapper for Sqlite ORM on iOS and Android<
Usage:
using Subsystems.SqliteORM.External;
... ...
private CMPSqliteORMProxy _sqliteProxy
Initialize
private void PrepareDB()
{
var folderPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
var dbPathString = Path.Combine(folderPath + "/localdb.sql");
_sqliteProxy = new CMPSqliteORMProxy(dbPathString);
}
Create
private bool Create()
{
var result = _sqliteProxy.Create<EmployeeInfo>();
return result;
}
Insert
private bool Insert(EmployeeInfo employeeInfo)
{
var result = _sqliteProxy.Insert(employeeInfo);
return result;
}
InsertAsync
private async Task<bool> InsertAsync(EmployeeInfo employeeInfo)
{
var result = await _sqliteProxy.InsertAsync(employeeInfo);
return result;
}
Fetch
private List<EmployeeInfo> Fetch()
{
var result = _sqliteProxy.Fetch<EmployeeInfo>();
return result;
}
FetchAsync
private async Task<List<EmployeeInfo>> FetchAsync()
{
var pd = new Predicate<EmployeeInfo>((EmployeeInfo emp) =>
{
return (emp.Name.StartsWith("H", StringComparison.CurrentCultureIgnoreCase));
});
var result = await _sqliteProxy.FetchAsync<EmployeeInfo>(pd);
return result;
}
UpdateAsync
private async Task<bool> UpdateAsync(EmployeeInfo employeeInfo)
{
var result = await _sqliteProxy.UpdateAsync(employeeInfo);
return result;
}
DeleteAsync
private async Task<bool> DeleteAsync(EmployeeInfo employeeInfo)
{
var result = await _sqliteProxy.DeleteAsync(employeeInfo);
return result;
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
MonoAndroid | monoandroid90 is compatible. |
Xamarin.iOS | xamarinios10 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
MonoAndroid 9.0
- sqlite-net-pcl (>= 1.5.231)
- SQLitePCLRaw.bundle_green (>= 1.1.11)
- SQLitePCLRaw.core (>= 1.1.11)
- SQLitePCLRaw.lib.e_sqlite3.android (>= 1.1.11)
- SQLitePCLRaw.provider.e_sqlite3.android (>= 1.1.11)
-
Xamarin.iOS 1.0
- sqlite-net-pcl (>= 1.5.231)
- SQLitePCLRaw.bundle_green (>= 1.1.11)
- SQLitePCLRaw.core (>= 1.1.11)
- SQLitePCLRaw.provider.sqlite3.ios_unified (>= 1.1.11)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
1. Initial release for SqliteORM
2. Works for both iOS & Android
3. Supports both Sync and Async operations