Skip to content

Commit

Permalink
add migrations files and rmove _CookieConsentPartial
Browse files Browse the repository at this point in the history
  • Loading branch information
cephalin committed Aug 5, 2019
1 parent 1b6047b commit 9b96d5e
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 29 deletions.
37 changes: 37 additions & 0 deletions Migrations/20190805115847_InitialCreate.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions Migrations/20190805115847_InitialCreate.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace DotNetCoreSqlDb.Migrations
{
public partial class InitialCreate : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Todo",
columns: table => new
{
ID = table.Column<int>(nullable: false)
.Annotation("Sqlite:Autoincrement", true)
.Annotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn),
Description = table.Column<string>(nullable: true),
CreatedDate = table.Column<DateTime>(nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Todo", x => x.ID);
});
}

protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Todo");
}
}
}
35 changes: 35 additions & 0 deletions Migrations/MyDatabaseContextModelSnapshot.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// <auto-generated />
using System;
using DotNetCoreSqlDb.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

namespace DotNetCoreSqlDb.Migrations
{
[DbContext(typeof(MyDatabaseContext))]
partial class MyDatabaseContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "2.2.6-servicing-10079");

modelBuilder.Entity("DotNetCoreSqlDb.Models.Todo", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd();

b.Property<DateTime>("CreatedDate");

b.Property<string>("Description");

b.HasKey("ID");

b.ToTable("Todo");
});
#pragma warning restore 612, 618
}
}
}
25 changes: 0 additions & 25 deletions Views/Shared/_CookieConsentPartial.cshtml

This file was deleted.

7 changes: 3 additions & 4 deletions Views/Shared/_Layout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - DotNetCoreSqlDb</title>
<title>@ViewData["Title"] - My TodoList App</title>

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

<footer class="border-top footer text-muted">
<div class="container">
&copy; 2019 - DotNetCoreSqlDb - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
&copy; 2019 - My TodoList App - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
</div>
</footer>

Expand Down

0 comments on commit 9b96d5e

Please sign in to comment.