BusinessScaffold 1.0.1
dotnet add package BusinessScaffold --version 1.0.1
NuGet\Install-Package BusinessScaffold -Version 1.0.1
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="BusinessScaffold" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BusinessScaffold" Version="1.0.1" />
<PackageReference Include="BusinessScaffold" />
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 BusinessScaffold --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BusinessScaffold, 1.0.1"
#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 BusinessScaffold@1.0.1
#: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=BusinessScaffold&version=1.0.1
#tool nuget:?package=BusinessScaffold&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
BusinessScaffold Library
A .NET library for business order management operations with Entity Framework integration.
Features
- Order creation and management (
CreateTestOrd
,CreateMovOrd
,UpdateTestOrd
) - Article record creation with LINQ and raw SQL approaches
- Support for multiple table types:
artprotc
,artproxtc
,lotcprotc
- Stored procedure execution
- Tab number management (
GetTabNuma
,UpdateTabNuma
) - Built-in dependency injection support
Installation
As a NuGet Package
Build the project and reference the generated .dll
file in your projects.
As a Project Reference
Add a project reference to your solution.
Usage
1. Add to Dependency Injection
using BusinessScaffold;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices((context, services) =>
{
// Method 1: With connection string
services.AddBusinessScaffold(connectionString);
// Method 2: With custom DbContext configuration
services.AddBusinessScaffold(options =>
options.UseSqlServer(connectionString));
})
.Build();
2. Inject and Use the Repository
using businessScaffold;
public class YourService
{
private readonly IOrdRepository _ordRepository;
public YourService(IOrdRepository ordRepository)
{
_ordRepository = ordRepository;
}
public async Task ProcessOrder()
{
const string codditt = "COMPANY";
const string tipork = "R";
const short anno = 2025;
const string serie = " ";
// Get next order number
var numOrd = await _ordRepository.GetTabNuma(tipork, serie, anno, codditt);
// Create test order
await _ordRepository.CreateTestOrd(codditt, tipork, 4010001, anno, serie, numOrd);
// Add articles
var articles = new List<ArticoToAdd>
{
new() { Codditt = codditt, Codart = "ART001", Prezzo = 10.00m }
};
await _ordRepository.CreateMovOrd(codditt, tipork, anno, serie, numOrd, articles);
// Create article records
await _ordRepository.CreateArtprotcRecordsRawSql(codditt, tipork, anno, serie, numOrd);
await _ordRepository.CreateArtproxtcRecordsRawSql(codditt, tipork, anno, serie, numOrd);
await _ordRepository.CreateLotcprotcRecordsRawSql(codditt, tipork, anno, serie, numOrd);
// Update tab number
await _ordRepository.UpdateTabNuma(tipork, serie, anno, codditt, numOrd);
}
}
Available Methods
IOrdRepository Interface
CreateTestOrd
- Creates a test orderUpdateTestOrd
- Updates an existing test orderCreateMovOrd
- Creates order movements for articlesRunStoreProcedure1
- Executes a stored procedureCreateArtprotcRecords
- Creates artprotc records using LINQCreateArtprotcRecordsRawSql
- Creates artprotc records using raw SQLCreateArtproxtcRecordsRawSql
- Creates artproxtc records using raw SQLCreateLotcprotcRecordsRawSql
- Creates lotcprotc records using raw SQLGetTabNuma
- Gets the next tab numberUpdateTabNuma
- Updates the tab number
Article Tables
The library supports three types of article tables:
- artprotc - Article records with magazine support
- artproxtc - Article records without magazine (simplified)
- lotcprotc - Article records with lot, commercial category, and location support
Configuration
Make sure your appsettings.json
contains the database connection string:
{
"ConnectionStrings": {
"CubezellaContext": "Server=your-server;Database=your-db;Trusted_Connection=true;"
}
}
Requirements
- .NET 9.0
- Entity Framework Core 9.0.4
- SQL Server
License
[Your License Here]
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net9.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net9.0
- Microsoft.EntityFrameworkCore.SqlServer (>= 9.0.4)
- Microsoft.Extensions.Hosting (>= 9.0.6)
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.0.1 | 137 | 7/3/2025 |
Added license information and improved package metadata.