Skip to content

Commit 135c989

Browse files
committed
updates
1 parent 7919359 commit 135c989

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

MyApp/Configure.Db.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using ServiceStack.Data;
33
using ServiceStack.OrmLite;
44
using MyApp.Data;
5+
using Microsoft.EntityFrameworkCore.Diagnostics;
56

67
[assembly: HostingStartup(typeof(MyApp.ConfigureDb))]
78

@@ -12,14 +13,16 @@ public class ConfigureDb : IHostingStartup
1213
public void Configure(IWebHostBuilder builder) => builder
1314
.ConfigureServices((context, services) => {
1415
var connectionString = context.Configuration.GetConnectionString("DefaultConnection")
15-
?? "DataSource=App_Data/app.db;Cache=Shared";
16+
?? "DataSource=App_Data/app.db;Cache=Shared";
1617

1718
services.AddOrmLite(options => options.UseSqlite(connectionString));
1819

1920
// $ dotnet ef migrations add CreateIdentitySchema
2021
// $ dotnet ef database update
21-
services.AddDbContext<ApplicationDbContext>(options =>
22-
options.UseSqlite(connectionString, b => b.MigrationsAssembly(nameof(MyApp))));
22+
services.AddDbContext<ApplicationDbContext>(options => {
23+
options.UseSqlite(connectionString, b => b.MigrationsAssembly(nameof(MyApp)));
24+
options.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning));
25+
});
2326

2427
// Enable built-in Database Admin UI at /admin-ui/database
2528
services.AddPlugin(new AdminDatabaseFeature());

MyApp/MyApp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.*" />
2424
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.*" />
2525
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="10.*" />
26-
<PackageReference Include="Markdig" Version="0.43.*" />
26+
<PackageReference Include="Markdig" Version="0.44.*" />
2727
</ItemGroup>
2828

2929
<ItemGroup>

MyApp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"scripts": {
33
"postinstall": "node postinstall.js && npm run migrate",
4-
"dtos": "x mjs",
4+
"dtos": "npx get-dtos mjs",
55
"dev": "dotnet watch",
66
"ui:dev": "tailwindcss -i ./tailwind.input.css -o ./wwwroot/css/app.css --watch",
77
"ui:build": "tailwindcss -i ./tailwind.input.css -o ./wwwroot/css/app.css --minify",

0 commit comments

Comments
 (0)