Skip to content

Commit 9b96d5e

Browse files
committed
add migrations files and rmove _CookieConsentPartial
1 parent 1b6047b commit 9b96d5e

5 files changed

+108
-29
lines changed

Migrations/20190805115847_InitialCreate.Designer.cs

+37
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using Microsoft.EntityFrameworkCore.Metadata;
3+
using Microsoft.EntityFrameworkCore.Migrations;
4+
5+
namespace DotNetCoreSqlDb.Migrations
6+
{
7+
public partial class InitialCreate : Migration
8+
{
9+
protected override void Up(MigrationBuilder migrationBuilder)
10+
{
11+
migrationBuilder.CreateTable(
12+
name: "Todo",
13+
columns: table => new
14+
{
15+
ID = table.Column<int>(nullable: false)
16+
.Annotation("Sqlite:Autoincrement", true)
17+
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
18+
Description = table.Column<string>(nullable: true),
19+
CreatedDate = table.Column<DateTime>(nullable: false)
20+
},
21+
constraints: table =>
22+
{
23+
table.PrimaryKey("PK_Todo", x => x.ID);
24+
});
25+
}
26+
27+
protected override void Down(MigrationBuilder migrationBuilder)
28+
{
29+
migrationBuilder.DropTable(
30+
name: "Todo");
31+
}
32+
}
33+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// <auto-generated />
2+
using System;
3+
using DotNetCoreSqlDb.Models;
4+
using Microsoft.EntityFrameworkCore;
5+
using Microsoft.EntityFrameworkCore.Infrastructure;
6+
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
7+
8+
namespace DotNetCoreSqlDb.Migrations
9+
{
10+
[DbContext(typeof(MyDatabaseContext))]
11+
partial class MyDatabaseContextModelSnapshot : ModelSnapshot
12+
{
13+
protected override void BuildModel(ModelBuilder modelBuilder)
14+
{
15+
#pragma warning disable 612, 618
16+
modelBuilder
17+
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");
18+
19+
modelBuilder.Entity("DotNetCoreSqlDb.Models.Todo", b =>
20+
{
21+
b.Property<int>("ID")
22+
.ValueGeneratedOnAdd();
23+
24+
b.Property<DateTime>("CreatedDate");
25+
26+
b.Property<string>("Description");
27+
28+
b.HasKey("ID");
29+
30+
b.ToTable("Todo");
31+
});
32+
#pragma warning restore 612, 618
33+
}
34+
}
35+
}

Views/Shared/_CookieConsentPartial.cshtml

-25
This file was deleted.

Views/Shared/_Layout.cshtml

+3-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<title>@ViewData["Title"] - DotNetCoreSqlDb</title>
6+
<title>@ViewData["Title"] - My TodoList App</title>
77

88
<environment include="Development">
99
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
@@ -21,7 +21,7 @@
2121
<header>
2222
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
2323
<div class="container">
24-
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">DotNetCoreSqlDb</a>
24+
<a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">My TodoList App</a>
2525
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
2626
aria-expanded="false" aria-label="Toggle navigation">
2727
<span class="navbar-toggler-icon"></span>
@@ -40,15 +40,14 @@
4040
</nav>
4141
</header>
4242
<div class="container">
43-
<partial name="_CookieConsentPartial" />
4443
<main role="main" class="pb-3">
4544
@RenderBody()
4645
</main>
4746
</div>
4847

4948
<footer class="border-top footer text-muted">
5049
<div class="container">
51-
&copy; 2019 - DotNetCoreSqlDb - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
50+
&copy; 2019 - My TodoList App - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
5251
</div>
5352
</footer>
5453

0 commit comments

Comments
 (0)