Xamarin.SqliteORM
1.0.1
dotnet add package Xamarin.SqliteORM --version 1.0.1
NuGet\Install-Package Xamarin.SqliteORM -Version 1.0.1
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.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Xamarin.SqliteORM --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Xamarin.SqliteORM, 1.0.1"
#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.
// Install Xamarin.SqliteORM as a Cake Addin #addin nuget:?package=Xamarin.SqliteORM&version=1.0.1 // Install Xamarin.SqliteORM as a Cake Tool #tool nuget:?package=Xamarin.SqliteORM&version=1.0.1
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.
Code refactoring
Minor fixes