Lighter.NET.DB
1.7.1
dotnet add package Lighter.NET.DB --version 1.7.1
NuGet\Install-Package Lighter.NET.DB -Version 1.7.1
<PackageReference Include="Lighter.NET.DB" Version="1.7.1" />
<PackageVersion Include="Lighter.NET.DB" Version="1.7.1" />
<PackageReference Include="Lighter.NET.DB" />
paket add Lighter.NET.DB --version 1.7.1
#r "nuget: Lighter.NET.DB, 1.7.1"
#:package Lighter.NET.DB@1.7.1
#addin nuget:?package=Lighter.NET.DB&version=1.7.1
#tool nuget:?package=Lighter.NET.DB&version=1.7.1
Lighter.NET.DB is a Lightweight ORM data access layer utilizing Entity Framework 6.4.4. It aims to provide an easy to use and flexsible db access experience for .NET developer. With Lighter.NET.DB, you can seamlessly combine ORM and conventional SQL script coding style for data access operations in a concise and efficient manner. Moreover, you can completely say Goodby to the long-winded Entity Data Model file structures, such as *.edmx, *.Context.tt, *.Designer.cs, and unecessary DbSets for db table mapping.
It features the followings:
- Full select, insert, update, delete support in ORM approach.
- Easy data paging for select result set.
- Automatic logging for update and delete operation.
- Simpify the transactional db operations that eliminates all the boilerplate code of using tranaction, try...catch, commit when success and rollback when failure.
Release Notes Ver. 1.7.1 1. Fix: WhereBuilder IN logic operator not working when skipNullOrEmpty argument is false. 2. Add: WhereBuilder.AND() and WhereBuilder.OR() overload for simple sql expression without variables and parameters.
Ver. 1.7.0 1. Security: The underlining Entity Framework version of this library has been upgrade from 6.4.4 to 6.5.1 in order to prevent high risk security vulnerability according to the advise from Microsoft. 2. Causion: You should do testing to make sure this version fully compatible to your exsiting project before upgrading.
Ver. 1.6.2 1. Fix: The DbServiceBaseOfT.Insert() overloads with output argument which throw an bug exception with message of invalid column name.
Ver. 1.6.1 1. New: A new AutoIncrementAttribute to indicate which property of data model is corresponding to the auto-increment indentity column of data table. When specified, the column will be excluded during Insert() related operations. 2. Add: New DbServiceBaseOfT.Insert() overloads that can return the auto-increment indentity column value of the newly inserted record through an out argument. 3. Change: When an data model class implement the IUpdater interface, the updater related columns will be automatically filled with the same value of creator's.
Ver. 1.6.0 1. New: New OrderBy class to define order by clause for sql qeury expression. 2. Enhance: The Select(), SelectAll(), SelectSingle(), SelectDataTable() methods now support order by functionality by passing in an argument of OrderBy instance or lambda expression. 3. Add: New allowNullOrEmptyModel argument for all Delete() method which is used to specify whether an exception will be throw out when the model or modelList argument is null or empty. The default is false.
Ver. 1.5.1 1. Enhance: WhereBuilder.ParseOperator() to deal with the case when there is no space between field expression and logical operator.
Ver. 1.5.0 1. Add: DbMappingAttribute and DbObjectType for data model annotation for the mapping between data model class and db table schema. 2. Add: DbPermissionModel for db objects permission setting programming.
Ver. 1.4.1 1. Fix: Lighter.NET.DB.DbServiceBase.ConvertToSqlParameters() that deal with the argument of SqlParameter[] in addition to anonymous object parameter.
Ver. 1.4.0 1. Remove: PagingSelect_Phase3() from DbServiceBase and DbServerBaseOfT because the PageCount, StartRowNo, EndRowNo has become automatically calculated from TotalRowCount and RowsPerPage. 2. Add: New constructor of LighterDb with connectionString argument. 3. Enhance: Lighter.NET.DB.WhereBuilder to support more operators and clauses, such as IN, LIKE, IS NULL, EXISTS and their negated one. An important behavior change is that the skipNullOrEmpty argument of AND() and OR() methods are default to false from this version to better reflect the caller intent. 4. Fix: SqlException for: The number of rows provided for a FETCH clause must be greater then zero
Ver. 1.3.1 1. Bug fix for DbServiceBase.BuildRowCountSql() to handle sql syntax which contains Union keyword.
Ver. 1.3.0 1. Add: ConnectionString property to DbServiceConfig 2. Add: LighterDb class as a general db access and transaction operation service of Lighter.NET.DB 3. The LighterDb.NewContext() static method provide reusable db context for multiple db service, while the LighterDb.TransactionContext() provide reusable db context for transactional operation. 4. Add: BeginTransaction() to DbContextBase for trasactional db operation 5. Clarify the concept of "reusable" for DbServiceBase and DbContextBase that when true means the underlining dbcontext owns the dbconnection and will automatically dispose the dbconnection when itself is disposed, on the contrary the false means the dbconnection is not owned by the dbcontext.
Ver. 1.2.0 1. New DbServiceBase.SaveChangeList() that support batch updating for multiple changed(added, updated, deleted) records using transaction.
Ver. 1.1.0 1. To save db connection resource, change db connection opening timing to be just before the sqlcommand execution rather than when creating a new db service instance. 2. Add: WhereBuilder to simplify creating the where condition sql expression for complicated search context with multiple optional fields. 3. Make SetPaging() method virtual to be overridable by the generic version of DbService. 4. Add: UpdateExcept() method to update a record except specified fields. 5. Add: DbLogServiceBase for creating DbService dedicated to handling logging.
Ver. 1.0.1 1. Fix ExecuteCommand method, adding dispose of dbcontext
Ver. 1.0.0 First Release.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- EntityFramework (>= 6.5.1)
- Lighter.NET (>= 1.4.0)
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.7.1 | 124 | 1/8/2025 |
1.7.0 | 141 | 11/8/2024 |
1.6.2 | 130 | 10/16/2024 |
1.6.1 | 127 | 10/10/2024 |
1.6.0 | 127 | 9/23/2024 |
1.5.1 | 165 | 3/20/2024 |
1.5.0 | 157 | 3/10/2024 |
1.4.1 | 192 | 1/15/2024 |
1.4.0 | 144 | 1/9/2024 |
1.3.1 | 220 | 11/14/2023 |
1.3.0 | 177 | 11/1/2023 |
1.2.0 | 168 | 9/22/2023 |
1.1.0 | 177 | 9/8/2023 |
1.0.1 | 196 | 6/28/2023 |
1.0.0 | 201 | 6/16/2023 |
1. Fix: WhereBuilder IN logic operator not working when skipNullOrEmpty argument is false.
2. Add: WhereBuilder.AND() and WhereBuilder.OR() overload for simple sql expression without variables and parameters.