From 8cecb13054abf1e85b46afff09bb424f742387b3 Mon Sep 17 00:00:00 2001 From: Piotr Date: Mon, 10 Jan 2022 11:50:39 -0500 Subject: [PATCH] Getting started - issue #3 (#5) * Getting started - issue #3 * Update README.md updated with the nuget dependency * Minor tweaks. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 972096d..c6f2044 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,21 @@ Traditionally, a [Data-tier Application (DAC)](https://docs.microsoft.com/en-us/
+## Getting started + +The easiest way to get started is to clone the repository and execute `DbEx.Test.Console` project, this will create a database with data. + +``` bash +DbEx.Test.Console git:(main)> export cs="Data Source=localhost, 1433;Initial Catalog=DbEx.Console;User id=sa;Password=Xxxxxx@123;TrustServerCertificate=true" +DbEx.Test.Console git:(main)> dotnet run -- -cv cs all +``` + +Next, create your own console app, follow the structure of `DbEx.Test.Console` project, add reference to https://www.nuget.org/packages/DbEx and your SQL scripts. + +Currently, the easiest way of generating scripts from an existing database, is to use the `Generate Scripts` feature of SQL Server Management Studio and copy its output. + +
+ ### Commands (functions) The _DbEx_ [`DatabaseMigratorBase`](./src/DbEx/Migration/DatabaseMigratorBase.cs) provides the base database provider agnostic capability, with the [`SqlServerMigrator`](./src/DbEx/Migration/SqlServer/SqlServerMigrator.cs) providing the specific Microsoft SQL Server implementation, that automates the functionality as specified by the [`MigrationCommand`](./src/DbEx/Migration/MigrationCommand.cs). One or more commands can be specified, and they will be executed in the order listed.