Apstory.Scaffold.App.linux-x64 1.1.0.119

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

Apstory.Scaffold.App

Overview

Apstory.Scaffold.App follows an MSSQL database-first approach to generate CRUD stored procedures and related C# code.
It adopts a convention-over-configuration methodology, reducing complexity when running the application.

Generated SQL Procedures

When running regen on a table, the following SQL procedures will be generated:

  • DelHrd – Hard delete from the table.
  • DelSft – Soft delete (marks row as IsActive = false).
  • GetByTableNameIds – Fetches rows based on a list of supplied IDs.
  • GetById – Fetches a record based on the primary key.
  • GetByIds – Fetches records based on foreign keys.
  • GetByIdsPaging – Fetches a paginated set of rows.
  • InsUpd – Inserts or updates an entry in the table.

Generated C# Structure

Dependency Injection (DI) Registration

  • Common/ProjectName.Common.ServiceCollectionExtension/Gen/AddGeneratedRepositoriesServiceCollectionExtension.cs
    • Registers repositories with SQL connection strings.
  • Common/ProjectName.Common.ServiceCollectionExtension/Gen/AddGeneratedServicesServiceCollectionExtension.cs
    • Registers services.

Data Access Layer (DAL)

  • Dal/ProjectName.Dal.Dapper/Gen/TableNameRepository.Gen.cs
    • Contains Dapper methods to interact with the SQL database.
  • Dal/ProjectName.Dal.Interface/Gen/ITableNameRepository.Gen.cs
    • Repository interface.

Domain Layer

  • Domain/ProjectName.Domain/Gen/TableNameService.Gen.cs
    • Service layer that interacts with the repository.
  • Domain/ProjectName.Domain/Gen/TableNameService.Foreign.Gen.cs
    • Extends the service layer with additional methods for handling foreign key relationships (depth of 1).
  • Domain/ProjectName.Domain.Interface/Gen/ITableNameService.Gen.cs
    • Interface for the service layer.
  • Domain/ProjectName.Domain.Interface/Gen/ITableNameService.Foreign.Gen.cs
    • Interface for the foreign key service layer.

Model Layer

  • Model/ProjectName.Model/Gen/TableName.Gen.cs
    • Represents the database table as a model, including foreign key relationships.

Installation

To install or update the tool globally use the following command:

dotnet tool update Apstory.Scaffold.App --global

Usage

Running Apstory.Scaffold.App will search for a .sqlproj file, extract the namespace for the entire project, and begin watching for any .sql file changes.
By default, running the application without parameters will make it run in the background, continuously watching for file changes.
The .sqlproj file used can be overridden using the -sqlproject parameter.

Available Command-Line Switches

  • -sqlproject <path>
    Overrides the SQL project path instead of letting the application search for it.

  • -namespace <name>
    Overrides the namespace for scaffolded code instead of fetching it from the .sqlproj.

  • -regen <params>
    Executes immediate regeneration of files.

    • When no parameters are supplied, it regenerates all found schemas.
    • You can specify:
      • A schema: dbo
      • A table: dbo.tablename
      • A procedure: dbo.zgen_procname
    • Multiple entities can be specified using ;, e.g.:
      -regen dbo;dbo.Customer;dbo.zgen_GetOrders
      
  • -sqlpush <params>
    Pushes changes to the database.

    • When left empty, it detects Git changes.
    • You can specify:
      • A table: dbo.tablename (Limited functionality - Will only push new tables, not any updates made to an existing table)
      • A procedure: dbo.zgen_procname
    • Requires the -sqldestination switch.
      • Specifies the database connection string for pushing changes.
    • Note: Only initial table creation can be pushed, no table updates are pushed.
    • Multiple entities can be specified using ;, e.g.:
      -sqlpush dbo.Customer;dbo.zgen_InsertOrder
      
  • -delete
    Deletes and removes associated scaffolded code.

    • When left empty, it deletes all scaffolded code.
    • You can specify:
      • A schema: dbo To delete all scaffolded code within a schema.
      • A table: dbo.tablename to delete the table and all scaffolded sql stored procedures
      • A procedure: dbo.zgen_procname
  • -tsdalfolder Scaffolds a SQLite repository based on a typescript model

    • Requires the -tsmodel switch to point to a specific typescript model.
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.1.0.119 105 9/7/2026
1.1.0.118 113 8/12/2026
1.1.0.117 131 6/26/2026
1.1.0.116 123 6/15/2026
1.1.0.115 128 6/8/2026
1.1.0.114 124 6/1/2026
1.1.0.113 125 4/14/2026
1.1.0.112 118 4/14/2026
1.1.0.111 120 4/14/2026
1.1.0.110 120 4/14/2026
1.1.0.108 152 2/2/2026
1.1.0.107 135 2/2/2026
1.1.0.106 230 12/5/2025
1.1.0.105 703 12/3/2025