1
1
// <auto-generated />
2
+ using System ;
2
3
using Microsoft . EntityFrameworkCore ;
3
4
using Microsoft . EntityFrameworkCore . Infrastructure ;
4
5
using Microsoft . EntityFrameworkCore . Metadata ;
@@ -14,10 +15,27 @@ protected override void BuildModel(ModelBuilder modelBuilder)
14
15
{
15
16
#pragma warning disable 612 , 618
16
17
modelBuilder
17
- . HasAnnotation ( "ProductVersion" , "2.1.1 -rtm-30846 " )
18
+ . HasAnnotation ( "ProductVersion" , "2.1.3 -rtm-32065 " )
18
19
. HasAnnotation ( "Relational:MaxIdentifierLength" , 128 )
19
20
. HasAnnotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn ) ;
20
21
22
+ modelBuilder . Entity ( "TodoApp.Entity.TodoItem" , b =>
23
+ {
24
+ b . Property < int > ( "TodoItemId" )
25
+ . ValueGeneratedOnAdd ( )
26
+ . HasAnnotation ( "SqlServer:ValueGenerationStrategy" , SqlServerValueGenerationStrategy . IdentityColumn ) ;
27
+
28
+ b . Property < string > ( "Description" ) ;
29
+
30
+ b . Property < int ? > ( "UserId" ) ;
31
+
32
+ b . HasKey ( "TodoItemId" ) ;
33
+
34
+ b . HasIndex ( "UserId" ) ;
35
+
36
+ b . ToTable ( "TodoItem" ) ;
37
+ } ) ;
38
+
21
39
modelBuilder . Entity ( "TodoApp.Entity.User" , b =>
22
40
{
23
41
b . Property < int > ( "UserId" )
@@ -32,6 +50,13 @@ protected override void BuildModel(ModelBuilder modelBuilder)
32
50
33
51
b . ToTable ( "User" ) ;
34
52
} ) ;
53
+
54
+ modelBuilder . Entity ( "TodoApp.Entity.TodoItem" , b =>
55
+ {
56
+ b . HasOne ( "TodoApp.Entity.User" , "User" )
57
+ . WithMany ( "TodoItems" )
58
+ . HasForeignKey ( "UserId" ) ;
59
+ } ) ;
35
60
#pragma warning restore 612 , 618
36
61
}
37
62
}
0 commit comments