File tree 3 files changed +6
-5
lines changed
3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,11 @@ private async Task<string> ResolveInternalAsync(string connectionStringName = nu
43
43
var demoUserId = _demoNameResolver . GetDemoUserIdOrNull ( ) ?? _configuration [ "App:DefaultDbName" ] ;
44
44
45
45
var dbFilePath = $ "{ dbFolder } { demoUserId } .db";
46
- var connString = $ "Data Source={ dbFilePath } ;Cache=Shared";
46
+ if ( ! File . Exists ( dbFilePath ) )
47
+ {
48
+ File . Copy ( _configuration [ "App:DbFolderName" ] ? . EnsureEndsWith ( Path . DirectorySeparatorChar ) + _configuration [ "App:DefaultDbName" ] + ".db" , dbFilePath ) ;
49
+ }
47
50
48
- return connString ;
51
+ return $ "Data Source= { dbFilePath } ;Cache=Shared" ;
49
52
}
50
53
}
Original file line number Diff line number Diff line change 4
4
@using Volo .Abp .Data ;
5
5
@inject IHtmlLocalizer <CmsKitDemoResource > L
6
6
@model CmsKitDemo .Pages .IndexModel
7
- @inject IConnectionStringResolver ConnectionStringResolver
8
7
9
8
@section styles {
10
9
<abp-style src =" /Pages/Index.cshtml.css" />
34
33
</div >
35
34
<div class =" col-lg-9 col-md-7 col-12 d-flex align-items-center" >
36
35
<div class =" ps-md-3 text-center text-md-start" >
37
- <h6 class =" mb-0" >ABP Framework - @await ConnectionStringResolver.ResolveAsync()</h6 >
38
36
<h1 >CMS Kit Module</h1 >
39
37
<p class =" pd-title mb-4" >This module provides CMS (Content Management System) capabilities for your application.</p >
40
38
<a href =" https://docs.abp.io/en/abp/latest/Modules/Cms-Kit/Index" target =" _blank" class =" btn btn-primary btn-lg product-btn" >Documentation</a >
Original file line number Diff line number Diff line change 5
5
"DbFolderName" : " CmsKitDemoDb"
6
6
},
7
7
"ConnectionStrings" : {
8
- "Default" : " Data Source=/ CmsKitDemoDb/CmsKitDemo.db;"
8
+ "Default" : " Data Source=CmsKitDemoDb/CmsKitDemo.db;"
9
9
},
10
10
"StringEncryption" : {
11
11
"DefaultPassPhrase" : " cZl2tCN43sVGDX6m"
You can’t perform that action at this time.
0 commit comments