psakusei 0.0.49

dotnet add package psakusei --version 0.0.49                
NuGet\Install-Package psakusei -Version 0.0.49                
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="psakusei" Version="0.0.49" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add psakusei --version 0.0.49                
#r "nuget: psakusei, 0.0.49"                
#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.
// Install psakusei as a Cake Addin
#addin nuget:?package=psakusei&version=0.0.49

// Install psakusei as a Cake Tool
#tool nuget:?package=psakusei&version=0.0.49                

psakusei - sakusei (sok-say) is Japanese for create (and yes it's a play on psake the PowerShell build tool). psakusei helps you quickly generate boiler plate or starter code using a database first design approach. Having tables within a database, code is then generated for every layer of the application using approrpriate templates.

Getting Started

Installation

PM/> Install-Package psakusei

During installation psakusei will create a Templates folder at the solution root and copy all available templates from psakusei.

Usage

PM\> Invoke-psakusei -ConnectionString "Data Source=.; Database=DBNAME; <creds>" -Template "Database*" -Table "Member" [-Force] [-Project "MyProject"] [-Provider "System.Data.SqlClient"]
  • -ConnectionString: Required - The connection string to the desired database that contains the table

  • -Provider: Optional - Defaults to System.Data.SqlClient

  • -Template: Required - The filename of the template in the templates folder (not including the extension .erb, wildcards * allowed to run multiple templates)

  • -Table: Required - The name of the table to generate code with (case senstive by the way)

  • -Project: Optional - Defaults to current the Project, or specify the name of the project to attach the final code file to

  • -Force: Optional - Defaults to false, whether or not to forcibly overwrite an existing file during template generation

Helper

To simplify entering connection strings over and over, check out the gencode sample script. This file can be copied to the solution root folder, modified to your liking, and called from the Package Manager Console as follows: .\gencode.ps1 -Project -Template -Table. The sample provided uses a SQL Server LocalDB to demonstrate path setups (in case SQLite was preferred).

Templates

psakusei uses DatabaseSchemaReader to read various database engine schemas into a consistant object model and EPS as the underlying template engine. The table schema is accessed through the template variable $table. For specific details for SQL engines supported, refer to the DB Schema Wiki. Alternatively, for EPS template details refer to the EPS readme. For all available templates, check out psakusei's Templates Folder.

Built-In Template Filters

  • Plural: Using English based grammar rules converts a word to its plural form as converted from Ruby Inflection rules
  • Singular: Using English based grammar rules converts a word to its singular form as converted from Ruby Inflection rules
  • Capitalize: Converts myFUNNYName to MyFUNNYName
  • Upper: Converts myFUNNYName to MYFUNNYNAME
  • Lower: Converts myFUNNYName to myfunnyname
  • Snake: Converts myFUNNYName to my_funny_name
  • Spine: Converts myFUNNYName to my-funny-name
  • Constant: Converts myFUNNYName to MY_FUNNY_NAME
  • Pascal: Converts myFUNNYName to MyFunnyName
  • Label: Converts myFUNNYName to My Funny Name
  • Camel: Converts myFUNNYName to myFunnyName
  • Last: Converts myFUNNYName to Name
There are no supported framework assets in this 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.0.49 1,013 5/18/2018