From 401a5b74696c471e5168e421e3de0db1e5f946a8 Mon Sep 17 00:00:00 2001 From: crupest Date: Fri, 12 Apr 2019 23:34:40 +0800 Subject: Add database connection. --- .../Migrations/DatabaseContextModelSnapshot.cs | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 Timeline/Migrations/DatabaseContextModelSnapshot.cs (limited to 'Timeline/Migrations/DatabaseContextModelSnapshot.cs') diff --git a/Timeline/Migrations/DatabaseContextModelSnapshot.cs b/Timeline/Migrations/DatabaseContextModelSnapshot.cs new file mode 100644 index 00000000..a833d2dc --- /dev/null +++ b/Timeline/Migrations/DatabaseContextModelSnapshot.cs @@ -0,0 +1,44 @@ +// +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using Timeline.Models; + +namespace Timeline.Migrations +{ + [DbContext(typeof(DatabaseContext))] + partial class DatabaseContextModelSnapshot : ModelSnapshot + { + protected override void BuildModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "2.2.3-servicing-35854") + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("Timeline.Models.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnName("id"); + + b.Property("EncryptedPassword") + .IsRequired() + .HasColumnName("password"); + + b.Property("Name") + .IsRequired() + .HasColumnName("name"); + + b.Property("RoleString") + .IsRequired() + .HasColumnName("roles"); + + b.HasKey("Id"); + + b.ToTable("user"); + }); +#pragma warning restore 612, 618 + } + } +} -- cgit v1.2.3