From 6b98e535dd42166c7b25e7572f516bf9e49ac13a Mon Sep 17 00:00:00 2001 From: Dillan Cagnetta Date: Fri, 30 Aug 2019 11:11:08 +0200 Subject: [PATCH] Updated: more concise instructions to change BookStoreEntityFrameworkCoreModule --- .../Best-Practices/PostgreSQL-Integration.md | 34 +++---------------- 1 file changed, 4 insertions(+), 30 deletions(-) diff --git a/docs/en/Best-Practices/PostgreSQL-Integration.md b/docs/en/Best-Practices/PostgreSQL-Integration.md index 77db54f957..f4fe71fdb9 100644 --- a/docs/en/Best-Practices/PostgreSQL-Integration.md +++ b/docs/en/Best-Practices/PostgreSQL-Integration.md @@ -5,36 +5,10 @@ ### EntityFrameworkCore Project Update - In `Acme.BookStore.EntityFrameworkCore` project replace package `Volo.Abp.EntityFrameworkCore.SqlServer` with `Volo.Abp.EntityFrameworkCore.PostgreSql` -- Update to use PostgreSQL in `BookStoreEntityFrameworkCoreModule`. Example: - -````C# -[DependsOn( - //code omitted for brevity - - /* This was updated from AbpEntityFrameworkCoreSqlServerModule */ - typeof(AbpEntityFrameworkCorePostgreSqlModule), - /* This was updated from AbpEntityFrameworkCoreSqlServerModule */ - - //code omitted for brevity - )] -public class Acme.BookStore.EntityFrameworkCoreModule : AbpModule - { - public override void ConfigureServices(ServiceConfigurationContext context) - { - context.Services.AddAbpDbContext(options => - { - options.AddDefaultRepositories(includeAllEntities: true); - }); - - Configure(options => - { - /* This was updated */ - options.UsePostgreSql(); - /* This was updated */ - }); - } - } -```` +- Update to use PostgreSQL in `BookStoreEntityFrameworkCoreModule`. + +1. **Do** Replace the `AbpEntityFrameworkCoreSqlServerModule` with the `AbpEntityFrameworkCorePostgreSqlModule` +2. **Do** Replace the `options.UseSqlServer()` with the `options.UsePostgreSql()` ### Update Connection String Settings - **Do** Update the PostgreSQL connection string in all `appsettings.json` files.