Benevia.Core.DataGenerator.LargeData 0.8.8

dotnet add package Benevia.Core.DataGenerator.LargeData --version 0.8.8
                    
NuGet\Install-Package Benevia.Core.DataGenerator.LargeData -Version 0.8.8
                    
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="Benevia.Core.DataGenerator.LargeData" Version="0.8.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Benevia.Core.DataGenerator.LargeData" Version="0.8.8" />
                    
Directory.Packages.props
<PackageReference Include="Benevia.Core.DataGenerator.LargeData" />
                    
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 Benevia.Core.DataGenerator.LargeData --version 0.8.8
                    
#r "nuget: Benevia.Core.DataGenerator.LargeData, 0.8.8"
                    
#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 Benevia.Core.DataGenerator.LargeData@0.8.8
                    
#: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=Benevia.Core.DataGenerator.LargeData&version=0.8.8
                    
Install as a Cake Addin
#tool nuget:?package=Benevia.Core.DataGenerator.LargeData&version=0.8.8
                    
Install as a Cake Tool

Benevia.Core.DataGenerator.LargeData

Overview

The Large Data Generator is a specialized tool for creating large volumes of test data in the Benevia ERP system. It's designed for load testing, performance testing, and integration testing scenarios where you need realistic amounts of data across multiple tenants.

Key Features

  • Web-based UI: Easy-to-use interface for configuring and running data generation
  • Tenant-specific: Generate data for specific tenants with custom configurations
  • Time-range based: Create data for specific date ranges (month-based selection)
  • Scalable: Configure the volume of data to generate per feature
  • Dependency management: Features can depend on other features to ensure proper data relationships
  • Authentication: Secure admin-only access with username/password authentication

Maintainers

Architecture Components

Core Classes

  • LargeDataGenerator.cs — Main orchestrator for large-data generation and feature discovery
  • LargeDataEndPoint.cs — HTTP endpoint controller for web-based data generation
  • DataCreator.cs — Feature implementations that create large volumes of domain data
  • ConfigStorage.cs — Configuration management for persisting large-data settings
  • AuthService.cs — Authentication service for secure endpoint access
  • ICreateLargeData.cs — Marker interface for large-data feature implementations

Web Interface

The system includes a sophisticated web UI accessible at /admin/large-data with the following features:

  • Dark theme interface with modern gradient design
  • Form-based configuration with persistent settings (stored in browser localStorage)
  • Real-time validation with error highlighting
  • Progress indicators during data generation
  • Responsive design that works on mobile and desktop

UI Fields Explained

  1. Base URL: The API endpoint URL (e.g., https://localhost:7140)
  2. Username/Password: Admin credentials for authentication
  3. Tenant ID: Target tenant for data generation (e.g., demo)
  4. From/To Month: Date range for generated data using month pickers
  5. Start Button: Initiates the data generation process
  6. Reset Button: Clears all form fields and localStorage

Configuration Setup

2. Service Registration

Register the large data generator in your Program.cs:

// Register assemblies containing large-data features
builder.Services.ConfigureLargeData();

// Map the web UI endpoints
await app.Services.InitializeDataGeneratorAsync();

3. Endpoint Registration

The system automatically registers these endpoints:

  • GET /admin/large-data - Web UI interface
  • POST /admin/large-data/run - API endpoint for triggering generation

Usage Methods

  1. Start your application with the Large Data Generator endpoints enabled
  2. Navigate to https://localhost:7140/admin/large-data in your browser
  3. Fill in the configuration form:
    • Base URL: Your API endpoint
    • Username/Password: Admin credentials
    • Tenant ID: Target tenant identifier
    • Date Range: Select from/to months for data generation
  4. Click Start to begin data generation
  5. Monitor progress through the toast notifications

Creating Large Data Features

Basic Feature Implementation

Create a class that implements ICreateLargeData:

using Benevia.Core.API.Database;
using Benevia.Core.DataGenerator.LargeData;
using Benevia.Core.DataGenerator.LargeData.Attributes;
using Benevia.Core.DataGenerator.LargeData.Models;

namespace Your.Project.LargeData;

public class ProductLargeData : ICreateLargeData
{
    public void CreateLargeData(IDataContext dataContext, DataCreator dataCreator, 
        DataFaker faker, DateTime startDate, DateTime endDate)
    {
        // Generate large volumes of products
        for (int i = 0; i < 1000; i++)
        {
            var product = new Product
            {
                Name = faker.Commerce.ProductName(),
                Description = faker.Commerce.ProductDescription(),
                Price = faker.Random.Decimal(1, 1000),
                CreatedDate = faker.Date.Between(startDate, endDate)
            };
            
            dataCreator.Create(product, nameof(Product));
        }
    }
}

Advanced Feature with Dependencies

Use the [DependsOn] attribute to ensure proper execution order:

[DependsOn(nameof(CustomerLargeData))]  // Ensure customers exist first
public class SalesLargeData : ICreateLargeData
{
    public void CreateLargeData(IDataContext dataContext, DataCreator dataCreator, 
        DataFaker faker, DateTime startDate, DateTime endDate)
    {
        // Get existing customers created by CustomerLargeData
        var customers = dataContext.GetEntities<Customer>().ToList();
        
        foreach (var customer in customers.Take(100))
        {
            // Create sales orders for each customer
            var salesOrder = new SalesOrder
            {
                CustomerGuid = customer.Guid,
                OrderDate = DateOnly.FromDateTime(faker.Date.Between(startDate, endDate)),
                Total = faker.Random.Decimal(100, 5000)
            };
            
            dataCreator.Create(salesOrder, nameof(SalesOrder));
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.

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
0.8.8 98 4/7/2026
0.8.8-ci.49 23 4/7/2026
0.8.8-ci.48 39 4/6/2026
0.8.7 153 4/2/2026
0.8.7-ci.46 42 4/2/2026
0.8.7-ci.45 41 4/2/2026
0.8.7-ci.44 39 4/1/2026
0.8.7-ci.43 38 3/31/2026
0.8.7-ci.42 37 3/31/2026
0.8.6 141 3/25/2026
0.8.6-ci.40 39 3/25/2026
0.8.5 93 3/25/2026
0.8.5-ci.38 42 3/25/2026
0.8.5-ci.37 44 3/25/2026
0.8.5-ci.36 42 3/24/2026
0.8.4 154 3/23/2026
0.8.4-ci.34 43 3/23/2026
0.8.4-ci.33 34 3/23/2026
0.8.3 87 3/19/2026
0.8.3-ci.31 39 3/19/2026
Loading failed