Swapping Databases

<< >>

Navigation:  CodeStencil > Miscellaneous Topics >

Swapping Databases

 

Most Stencils shipped with CodeStencil come installed with a Sqlite Chinook database.

 

 

CS_clip0042

 

To understand how database swapping is used in code generation, let us examine the screenshot above by explaining the enumerated sections:

 

1.Startup.cs

Here we can see 2 Startup.cs files tagged with "{Sqlite}" or "{SqlServer}".

What this means is that "Startup.cs {Sqlite}" contains code specific to the Sqlite Database while "Startup.cs {SqlServer}" contains code specific to the Sql Server database.

 

Startup.cs {Sqlite}

CS_clip0043

 

Startup.cs {SqlServer}

CS_clip0044

 

 

2.Expander - DATABASE

This expander indicates the database the generated application will be using. The expansion string is updated during Schema Import to reflect the database you are importing from.