File tree Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,12 @@ public class Message : BaseModel
1010 public int ChannelId { get ; set ; }
1111
1212 [ Column ( "message" ) ]
13- public string MessageData { get ; set ; }
13+ public string MessageData { get ; set ; } = null ! ;
1414
1515 [ Column ( "data" ) ]
16- public string Data { get ; set ; }
16+ public string Data { get ; set ; } = null ! ;
1717
1818 [ Column ( "username" ) ]
19- public string Username { get ; set ; }
19+ public string Username { get ; set ; } = null ! ;
2020 }
2121}
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ public class Movie : BaseModel
1212 public int Id { get ; set ; }
1313
1414 [ Column ( "name" ) ]
15- public string Name { get ; set ; }
15+ public string Name { get ; set ; } = null ! ;
1616
1717 [ Reference ( typeof ( Person ) ) ]
18- public List < Person > Persons { get ; set ; }
18+ public List < Person > Persons { get ; set ; } = new ( ) ;
1919
2020
2121 [ Column ( "created_at" ) ]
@@ -29,13 +29,13 @@ public class Person : BaseModel
2929 public int Id { get ; set ; }
3030
3131 [ Column ( "first_name" ) ]
32- public string FirstName { get ; set ; }
32+ public string FirstName { get ; set ; } = null ! ;
3333
3434 [ Column ( "last_name" ) ]
35- public string LastName { get ; set ; }
35+ public string LastName { get ; set ; } = null ! ;
3636
3737 [ Reference ( typeof ( Profile ) ) ]
38- public Profile Profile { get ; set ; }
38+ public Profile Profile { get ; set ; } = null ! ;
3939
4040 [ Column ( "created_at" ) ]
4141 public DateTime CreatedAt { get ; set ; }
@@ -45,7 +45,7 @@ public class Person : BaseModel
4545 public class Profile : BaseModel
4646 {
4747 [ Column ( "email" ) ]
48- public string Email { get ; set ; }
48+ public string Email { get ; set ; } = null ! ;
4949 }
5050
5151 [ Table ( "movie_person" ) ]
Original file line number Diff line number Diff line change @@ -9,19 +9,19 @@ namespace PostgrestExample.Models
99 public class User : BaseModel
1010 {
1111 [ PrimaryKey ( "username" ) ]
12- public string Username { get ; set ; }
12+ public string Username { get ; set ; } = null ! ;
1313
1414 [ Column ( "data" ) ]
15- public string Data { get ; set ; }
15+ public string Data { get ; set ; } = null ! ;
1616
1717 [ Column ( "age_range" ) ]
18- public IntRange AgeRange { get ; set ; }
18+ public IntRange AgeRange { get ; set ; } = null ! ;
1919
2020 [ Column ( "catchphrase" ) ]
21- public string Catchphrase { get ; set ; }
21+ public string Catchphrase { get ; set ; } = null ! ;
2222
2323 [ Column ( "status" ) ]
24- public string Status { get ; set ; }
24+ public string Status { get ; set ; } = null ! ;
2525
2626 [ Column ( "inserted_at" ) ]
2727 public DateTime InsertedAt { get ; set ; }
Original file line number Diff line number Diff line change 33 <OutputType >Exe</OutputType >
44 <TargetFrameworks >net8.0;net48</TargetFrameworks >
55 <LangVersion >latest</LangVersion >
6+ <Nullable >enable</Nullable >
67 </PropertyGroup >
78
89 <ItemGroup >
You can’t perform that action at this time.
0 commit comments