Xamarin.SqliteORM 1.0.0

There is a newer version of this package available.
See the version list below for details.
Install-Package Xamarin.SqliteORM -Version 1.0.0
dotnet add package Xamarin.SqliteORM --version 1.0.0
<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.
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, C# scripting and .NET Interactive. 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.0

// Install Xamarin.SqliteORM as a Cake Tool
#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;

    }

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 417 11/9/2018
1.0.0 349 11/7/2018

1. Initial release for SqliteORM
2. Works for both iOS & Android
3. Supports both Sync and Async operations