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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LogicBuilder.App.Bsl.Business" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LogicBuilder.App.Bsl.Business" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="LogicBuilder.App.Bsl.Business" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LogicBuilder.App.Bsl.Business --version 1.0.3
                    
#r "nuget: LogicBuilder.App.Bsl.Business, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LogicBuilder.App.Bsl.Business@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LogicBuilder.App.Bsl.Business&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=LogicBuilder.App.Bsl.Business&version=1.0.3
                    
Install as a Cake Tool

LogicBuilder.App.Bsl.Business

CI CodeQL codecov Quality Gate Status NuGet

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 (BaseModel instances)
  • DeleteEntityRequest: Delete domain entities
  • GetEntityRequest: Retrieve a single entity using filters and select/expand definitions
  • GetObjectListRequest: Query and retrieve lists of objects with projection capabilities
  • GetTypedListRequest: Retrieve strongly-typed lists with specific return types

Response Types

All response types inherit from BaseResponse and include:

  • Success: Boolean flag indicating operation outcome
  • ErrorMessages: Collection of error messages if the operation failed
  • TypeString: Assembly-qualified type name for polymorphic deserialization

Specific response types:

  • SaveEntityResponse: Returns the saved entity
  • DeleteEntityResponse: Confirms deletion status
  • GetEntityResponse: Returns the requested entity
  • GetListResponse: Returns a collection of BaseModel entities
  • GetObjectListResponse: Returns a collection of generic objects
  • ErrorResponse: General-purpose error response

Advanced Query Capabilities

Requests support LogicBuilder's expression descriptors for dynamic query building:

  • FilterLambdaDescriptor: Define filtering conditions
  • SelectorLambdaDescriptor: Specify projection and transformation logic
  • SelectExpandDefinitionDescriptor: 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.

Support

For issues, questions, or contributions, please visit the GitHub Issues page.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 173 7/29/2026

Making NuGet one of the release feeds.