Changeset a569b7c for resTools_backend/backend/Data/DataContext.cs
- Timestamp:
- 08/24/22 16:27:48 (2 years ago)
- Branches:
- master
- Children:
- 63f5ced
- Parents:
- a26f6a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
resTools_backend/backend/Data/DataContext.cs
ra26f6a1 ra569b7c 80 80 } 81 81 82 private DbSet<ToDoItem> toDoItems; 83 public DbSet<ToDoItem> ToDoItems 84 { 85 get 86 { 87 if (toDoItems == null) 88 { 89 toDoItems = Set<ToDoItem>(); 90 } 91 92 return toDoItems; 93 } 94 } 95 82 96 83 97 protected override void OnModelCreating(ModelBuilder modelBuilder) … … 131 145 modelBuilder.Entity<Review>() 132 146 .HasOne(p => p.User); 147 148 // 149 // ToDoItem 150 // 151 modelBuilder.Entity<ToDoItem>().Property(x => x.Id).IsRequired().ValueGeneratedOnAdd(); 152 modelBuilder.Entity<ToDoItem>() 153 .HasOne(p => p.LinkedReview); 133 154 } 134 155 }
Note:
See TracChangeset
for help on using the changeset viewer.