LogicBuilder.Data
8.0.1
Prefix Reserved
dotnet add package LogicBuilder.Data --version 8.0.1
NuGet\Install-Package LogicBuilder.Data -Version 8.0.1
<PackageReference Include="LogicBuilder.Data" Version="8.0.1" />
<PackageVersion Include="LogicBuilder.Data" Version="8.0.1" />
<PackageReference Include="LogicBuilder.Data" />
paket add LogicBuilder.Data --version 8.0.1
#r "nuget: LogicBuilder.Data, 8.0.1"
#:package LogicBuilder.Data@8.0.1
#addin nuget:?package=LogicBuilder.Data&version=8.0.1
#tool nuget:?package=LogicBuilder.Data&version=8.0.1
LogicBuilder.Data
Purpose
LogicBuilder.Data provides the foundational base class (BaseData) for all data entities in the data access layer. This library is designed to work seamlessly with Entity Framework Core to enable generic CRUD operations and state tracking across your application's data stack.
Key Components
BaseData Class
The IBaseData interface and BaseData abstract class serve as the base for all Entity Framework POCO (Plain Old CLR Object) classes in your data layer. All data entities should inherit from this class to leverage the framework's generic repository pattern and state management capabilities.
EntityState Property
The EntityState property of type EntityStateType tracks the current state of each entity:
- Added - Entity is new and should be inserted into the database
- Modified - Entity exists and has been changed
- Deleted - Entity should be removed from the database
- Unchanged - Entity exists but has not been modified
Integration with LogicBuilder.EntityFrameworkCore.SqlServer
The BaseData class is essential for the generic repository pattern implemented in LogicBuilder.EntityFrameworkCore.SqlServer. The framework uses the EntityState property to:
Track Entity Changes - The
LogicBuilder.EntityFrameworkCore.SqlServerlibrary reads theEntityStateproperty to determine which repository operation to perform (Insert, Update, Delete, or no action).Graph Operations - When saving entity graphs (entities with related child entities), the framework traverses the entire object graph and applies state changes based on each entity's
EntityStatevalue.State Conversion - The
LogicBuilder.EntityFrameworkCore.SqlServerlibrary converts the customEntityStateTypeenum values to Entity Framework's nativeEntityStatevalues when persisting changes.Repository Pattern - All generic repositories and stores constrain their type parameters to classes that inherit from
BaseData, ensuring consistent state tracking across all data operations.
Usage Example
public class StudentData : BaseData
{
public int StudentId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
}
// When creating a new entity
var student = new StudentData
{
FirstName = "John",
LastName = "Doe",
EntityState = EntityStateType.Added
};
// When modifying an existing entity
existingStudent.FirstName = "Jane";
existingStudent.EntityState = EntityStateType.Modified;
// When deleting an entity
studentToDelete.EntityState = EntityStateType.Deleted;
By inheriting from BaseData, your entities automatically participate in the framework's change tracking and can be used with all generic repository methods throughout the LogicBuilder ecosystem.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LogicBuilder.Data:
| Package | Downloads |
|---|---|
|
LogicBuilder.EntityFrameworkCore.SqlServer
Given an EF Core DBContext, LogicBuilder.EntityFrameworkCore.SqlServer uses AutoMapper configurations to support CRUD operations using the DTO objects. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.1 | 416 | 3/12/2026 |
| 7.1.0 | 309 | 1/12/2026 |
| 7.0.0 | 707 | 11/25/2024 |
| 6.0.3 | 282 | 11/3/2024 |
| 6.0.2 | 318 | 8/11/2024 |
| 6.0.1 | 300 | 3/28/2024 |
| 6.0.0 | 537 | 12/27/2023 |
| 5.0.12 | 360 | 10/14/2023 |
| 5.0.11 | 262 | 10/14/2023 |
| 5.0.10 | 382 | 8/15/2023 |
| 5.0.9 | 385 | 7/16/2023 |
| 5.0.8 | 580 | 5/10/2023 |
| 5.0.7 | 1,394 | 10/1/2022 |
| 5.0.6 | 1,531 | 6/16/2022 |
| 5.0.4 | 988 | 4/15/2022 |
| 5.0.3 | 978 | 4/15/2022 |
| 5.0.2 | 553 | 12/24/2021 |
| 5.0.1 | 659 | 12/14/2021 |
| 5.0.0 | 579 | 12/14/2021 |
| 4.1.3 | 883 | 9/8/2021 |
Refactoring to optimize DevOps.