ZayniFramework.DataAccess.LightORM 2.2.6

This is a lightweight CRUD ORM template for .NET data access application. You can use the DataContext to execute Insert, Update, Delete and Select action to database.

There is a newer version of this package available.
See the version list below for details.
Install-Package ZayniFramework.DataAccess.LightORM -Version 2.2.6
dotnet add package ZayniFramework.DataAccess.LightORM --version 2.2.6
<PackageReference Include="ZayniFramework.DataAccess.LightORM" Version="2.2.6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ZayniFramework.DataAccess.LightORM --version 2.2.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ZayniFramework.DataAccess.LightORM, 2.2.6"
#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 ZayniFramework.DataAccess.LightORM as a Cake Addin
#addin nuget:?package=ZayniFramework.DataAccess.LightORM&version=2.2.6

// Install ZayniFramework.DataAccess.LightORM as a Cake Tool
#tool nuget:?package=ZayniFramework.DataAccess.LightORM&version=2.2.6
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Using DataContext template to execute CRUD methods.

Add using.

using ZayniFramework.Common;
using ZayniFramework.DataAccess.Lightweight;

Write your own DataContext class and extends the DataContext class.

/// <summary>Your DataContext class.
/// </summary>
internal class UserDataContext : DataContext<UserReqArgs, UserModel>

Then you can do some CRUD action like...<br/>

DataContext.Insert();<br/>
DataContext.Update();<br/>
DataContext.Delete();<br/>
DataContext.Select();<br/>

var model = new UserModel()
{
    Account = "Amber",
    Name    = "Amber Jane",
    Age     = 22,
    DOB     = new DateTime( 1993, 2, 17 ),
    Sex     = 0,
    IsVip   = true
};

var reqArgs = new UserReqArgs()
{
    Account = "Amber"
};

var wheres = new SqlParameter[] 
{ 
    new SqlParameter() { ColumnName = "AccountId", Name = "Account",  DbType = DbTypeCode.String, Value = "Amber001" },
    new SqlParameter() { ColumnName = "Name",      Name = "UserName", DbType = DbTypeCode.String, Value = "Amber" }
};

var r = dataContext.Select( new SelectInfo<UserReqArgs>() { DataContent = reqArgs } );
var c = dataContext.Insert( model );
var u = dataContext.Update( model, wheres: wheres, ignoreColumns: new string[] { "Birthday", "IsVIP" } );
var d = dataContext.Delete( model );

More DataContext examples. You can go to here and here.

Using DataContext template to execute CRUD methods.

Add using.

using ZayniFramework.Common;
using ZayniFramework.DataAccess.Lightweight;

Write your own DataContext class and extends the DataContext class.

/// <summary>Your DataContext class.
/// </summary>
internal class UserDataContext : DataContext<UserReqArgs, UserModel>

Then you can do some CRUD action like...<br/>

DataContext.Insert();<br/>
DataContext.Update();<br/>
DataContext.Delete();<br/>
DataContext.Select();<br/>

var model = new UserModel()
{
    Account = "Amber",
    Name    = "Amber Jane",
    Age     = 22,
    DOB     = new DateTime( 1993, 2, 17 ),
    Sex     = 0,
    IsVip   = true
};

var reqArgs = new UserReqArgs()
{
    Account = "Amber"
};

var wheres = new SqlParameter[] 
{ 
    new SqlParameter() { ColumnName = "AccountId", Name = "Account",  DbType = DbTypeCode.String, Value = "Amber001" },
    new SqlParameter() { ColumnName = "Name",      Name = "UserName", DbType = DbTypeCode.String, Value = "Amber" }
};

var r = dataContext.Select( new SelectInfo<UserReqArgs>() { DataContent = reqArgs } );
var c = dataContext.Insert( model );
var u = dataContext.Update( model, wheres: wheres, ignoreColumns: new string[] { "Birthday", "IsVIP" } );
var d = dataContext.Delete( model );

More DataContext examples. You can go to here and here.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
5.0.121 127 5/1/2021
3.1.121 131 5/1/2021
2.31.120 74 3/14/2021
2.30.115 286 3/6/2021
2.30.114 43 3/6/2021
2.20.101 72 3/1/2021
2.19.3 78 2/11/2021
2.19.2 2,342 2/6/2021
2.19.1 71 1/6/2021
2.19.0 138 1/1/2021
2.18.3 158 12/27/2020
2.18.2 366 8/29/2020
2.18.1 118 8/26/2020
2.18.0 4,326 8/20/2020
2.17.135 115 8/19/2020
2.17.134 157 7/28/2020
2.17.133 184 7/27/2020
2.17.132 201 7/18/2020
2.17.131 285 7/11/2020
2.16.130 263 6/13/2020
2.15.128 178 6/3/2020
2.15.127 240 5/31/2020
2.15.126 640 4/30/2020
2.14.122 175 4/13/2020
2.13.100 233 3/12/2020
2.12.51 250 2/18/2020
2.11.50 210 2/10/2020
2.10.44 266 1/30/2020
2.9.43 440 1/11/2020
2.8.42 250 1/10/2020
2.8.41 214 1/5/2020
2.7.40 251 1/2/2020
2.7.39 216 1/2/2020
2.7.38 330 1/1/2020
2.6.37 238 12/23/2019
2.6.35 388 12/4/2019
2.6.1 200 12/2/2019
2.6.0 203 11/28/2019
2.5.2 367 11/26/2019
2.5.1 272 11/12/2019
2.5.0 191 11/9/2019
2.4.3 319 10/16/2019
2.4.2 196 10/16/2019
2.4.1 272 9/20/2019
2.3.113 44 3/6/2021
2.3.112 50 3/6/2021
2.3.28 230 9/19/2019
2.3.27 339 8/30/2019
2.3.26 293 8/20/2019
2.3.25 259 8/12/2019
2.3.22 243 7/31/2019
2.3.21 371 7/20/2019
2.3.20 340 6/22/2019
2.3.19 250 6/14/2019
2.3.18 256 6/13/2019
2.3.17 239 6/13/2019
2.3.15 261 6/8/2019
2.3.14 247 6/8/2019
2.3.13 273 5/30/2019
2.3.12 264 5/24/2019
2.3.11 234 5/24/2019
2.3.10 263 5/21/2019
2.3.9 251 5/9/2019
2.3.8 265 5/8/2019
2.3.7 285 4/30/2019
2.3.6 384 4/23/2019
2.3.5 269 4/19/2019
2.3.4 268 4/18/2019
2.3.3 269 4/17/2019
2.3.2 295 4/6/2019
2.3.1 459 12/15/2018
2.3.0 356 12/7/2018
2.2.6 377 11/25/2018
2.2.1 367 11/17/2018
2.2.0 355 11/16/2018
2.1.0 383 11/15/2018
2.0.1 379 11/6/2018
2.0.0 396 11/4/2018
Show less