LogicBuilder.App.Bsl.Business
1.0.3
Prefix Reserved
dotnet add package LogicBuilder.App.Bsl.Business --version 1.0.3
NuGet\Install-Package LogicBuilder.App.Bsl.Business -Version 1.0.3
<PackageReference Include="LogicBuilder.App.Bsl.Business" Version="1.0.3" />
<PackageVersion Include="LogicBuilder.App.Bsl.Business" Version="1.0.3" />
<PackageReference Include="LogicBuilder.App.Bsl.Business" />
paket add LogicBuilder.App.Bsl.Business --version 1.0.3
#r "nuget: LogicBuilder.App.Bsl.Business, 1.0.3"
#:package LogicBuilder.App.Bsl.Business@1.0.3
#addin nuget:?package=LogicBuilder.App.Bsl.Business&version=1.0.3
#tool nuget:?package=LogicBuilder.App.Bsl.Business&version=1.0.3
LogicBuilder.App.Bsl.Business
Overview
LogicBuilder.App.Bsl.Business is a .NET Standard 2.0 library that provides the foundational request and response data structures for LogicBuilder business services. This library defines the contract between clients and LogicBuilder business service implementations, enabling strongly-typed, serializable communication for CRUD operations and complex queries.
Purpose
This library serves as the communication protocol layer for LogicBuilder-based applications, providing:
- Request/Response Models: Standardized data transfer objects for client-service communication
- Type Safety: Strongly-typed models that leverage LogicBuilder's domain and expression infrastructure
- Serialization Support: JSON-serializable structures with custom converters for complex types
- Error Handling: Built-in error messaging and success indicators in response objects
Key Features
Request Types
All request types implement IBaseRequest and support various data operations:
SaveEntityRequest: Save or update domain entities (BaseModelinstances)DeleteEntityRequest: Delete domain entitiesGetEntityRequest: Retrieve a single entity using filters and select/expand definitionsGetObjectListRequest: Query and retrieve lists of objects with projection capabilitiesGetTypedListRequest: Retrieve strongly-typed lists with specific return types
Response Types
All response types inherit from BaseResponse and include:
Success: Boolean flag indicating operation outcomeErrorMessages: Collection of error messages if the operation failedTypeString: Assembly-qualified type name for polymorphic deserialization
Specific response types:
SaveEntityResponse: Returns the saved entityDeleteEntityResponse: Confirms deletion statusGetEntityResponse: Returns the requested entityGetListResponse: Returns a collection ofBaseModelentitiesGetObjectListResponse: Returns a collection of generic objectsErrorResponse: General-purpose error response
Advanced Query Capabilities
Requests support LogicBuilder's expression descriptors for dynamic query building:
FilterLambdaDescriptor: Define filtering conditionsSelectorLambdaDescriptor: Specify projection and transformation logicSelectExpandDefinitionDescriptor: Control which properties to include/expand
Installation
Install via NuGet Package Manager:
dotnet add package LogicBuilder.App.Bsl.Business
Or via Package Manager Console:
Install-Package LogicBuilder.App.Bsl.Business
Usage
Basic CRUD Operations
Save Entity Example:
using LogicBuilder.App.Bsl.Business.Requests;
using LogicBuilder.App.Bsl.Business.Responses;
using LogicBuilder.Domain;
// Create a save request
var saveRequest = new SaveEntityRequest
{
Entity = new MyEntity { Id = 1, Name = "Example" }
};
// Send to business service and receive response
SaveEntityResponse response = await businessService.SaveAsync(saveRequest);
if (response.Success)
{
Console.WriteLine($"Saved entity: {response.Entity}");
}
else
{
Console.WriteLine($"Errors: {string.Join(", ", response.ErrorMessages)}");
}
Get Entity Example:
using LogicBuilder.Expressions.Utils.ExpressionDescriptors;
using LogicBuilder.Expressions.Utils.ExpansionDescriptors;
var getRequest = new GetEntityRequest
{
Filter = new FilterLambdaDescriptor(
new EqualsBinaryDescriptor(
new MemberSelectorDescriptor("Id", new ParameterDescriptor("entity")),
new ConstantDescriptor(1)
),
typeof(MyEntity).AssemblyQualifiedName,
"entity"
),
SelectExpandDefinition = new SelectExpandDefinitionDescriptor(
new[] { "Id", "Name" },
new[] { new SelectExpandItemDescriptor("RelatedData") }
),
ModelType = typeof(MyEntity).AssemblyQualifiedName,
DataType = typeof(MyEntityData).AssemblyQualifiedName
};
GetEntityResponse response = await businessService.GetAsync(getRequest);
Serialization
All requests and responses are JSON-serializable:
using System.Text.Json;
// Configure JSON options
var options = new JsonSerializerOptions
{
PropertyNameCaseInsensitive = true
};
options.Converters.Add(new LogicBuilder.Domain.Json.ModelConverter());
// Serialize request
string json = JsonSerializer.Serialize(saveRequest, options);
// Deserialize response
var response = JsonSerializer.Deserialize<SaveEntityResponse>(json, options);
Error Handling
All responses include built-in error handling:
BaseResponse response = await businessService.ExecuteAsync(request);
if (!response.Success)
{
foreach (var error in response.ErrorMessages)
{
Console.WriteLine($"Error: {error}");
}
}
Dependencies
This library depends on:
- LogicBuilder.App.Utils - Utility functions and helpers
- LogicBuilder.Domain - Base domain models (
BaseModel) and JSON converters - LogicBuilder.Structures - Expression descriptors for dynamic query building
Target Framework
- .NET Standard 2.0 - Compatible with .NET Framework 4.6.1+ and .NET Core 2.0+
Project Structure
LogicBuilder.App.Bsl.Business/
├── Requests/
│ ├── IBaseRequest.cs # Base interface for all requests
│ ├── SaveEntityRequest.cs # Save/update entity operations
│ ├── DeleteEntityRequest.cs # Delete entity operations
│ ├── GetEntityRequest.cs # Retrieve single entity
│ ├── GetObjectListRequest.cs # Query object collections
│ └── GetTypedListRequest.cs # Query typed collections
└── Responses/
├── BaseResponse.cs # Abstract base with common properties
├── SaveEntityResponse.cs # Returns saved entity
├── DeleteEntityResponse.cs # Confirms deletion
├── GetEntityResponse.cs # Returns retrieved entity
├── GetListResponse.cs # Returns entity collections
├── GetObjectListResponse.cs # Returns object collections
├── ErrorResponse.cs # General error response
└── Json/
└── ResponseConverter.cs # Custom JSON converter for polymorphic responses
Testing
The library includes comprehensive unit tests (targeting .NET 10) covering:
- Request/response serialization and deserialization
- Null value handling
- Complex query descriptor structures
- Error scenarios and validation
Contributing
Contributions are welcome! Please refer to the main LogicBuilder repository for contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Links
Support
For issues, questions, or contributions, please visit the GitHub Issues page.
| 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
- LogicBuilder.Attributes (>= 2.0.6)
- LogicBuilder.Domain (>= 8.0.1)
- LogicBuilder.Structures (>= 8.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on LogicBuilder.App.Bsl.Business:
| Package | Downloads |
|---|---|
|
LogicBuilder.App.Bsl.Utils
This library handles query requests which includes data defined filters, expansions with specified entity and model types. Related components dynamically generate and execute the queries. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.3 | 172 | 7/29/2026 |
Making NuGet one of the release feeds.