Fleshed out entity classes and created command to create student
This commit is contained in:
@@ -9,7 +9,7 @@ using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
namespace BrightGlimmer.Data.Migrations
|
||||
{
|
||||
[DbContext(typeof(BgContext))]
|
||||
[Migration("20190424174147_CreateDatabase")]
|
||||
[Migration("20190424233105_CreateDatabase")]
|
||||
partial class CreateDatabase
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
@@ -157,6 +157,9 @@ namespace BrightGlimmer.Data.Migrations
|
||||
|
||||
b.HasIndex("AddressId");
|
||||
|
||||
b.HasIndex("StudentNumber")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Students");
|
||||
});
|
||||
|
||||
@@ -147,6 +147,12 @@ namespace BrightGlimmer.Data.Migrations
|
||||
name: "IX_Students_AddressId",
|
||||
table: "Students",
|
||||
column: "AddressId");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Students_StudentNumber",
|
||||
table: "Students",
|
||||
column: "StudentNumber",
|
||||
unique: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
@@ -155,6 +155,9 @@ namespace BrightGlimmer.Data.Migrations
|
||||
|
||||
b.HasIndex("AddressId");
|
||||
|
||||
b.HasIndex("StudentNumber")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("Students");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user