|
| 1 | +// <auto-generated /> |
| 2 | +using Microsoft.EntityFrameworkCore; |
| 3 | +using Microsoft.EntityFrameworkCore.Infrastructure; |
| 4 | +using Microsoft.EntityFrameworkCore.Metadata; |
| 5 | +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; |
| 6 | +using STW.SurveyAppWithMVCBlazer.DatabaseContext; |
| 7 | + |
| 8 | +#nullable disable |
| 9 | + |
| 10 | +namespace STW.SurveyAppWithMVCBlazer.Migrations |
| 11 | +{ |
| 12 | + [DbContext(typeof(ApplicationContext))] |
| 13 | + partial class ApplicationContextModelSnapshot : ModelSnapshot |
| 14 | + { |
| 15 | + protected override void BuildModel(ModelBuilder modelBuilder) |
| 16 | + { |
| 17 | +#pragma warning disable 612, 618 |
| 18 | + modelBuilder |
| 19 | + .HasAnnotation("ProductVersion", "6.0.7") |
| 20 | + .HasAnnotation("Relational:MaxIdentifierLength", 128); |
| 21 | + |
| 22 | + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); |
| 23 | + |
| 24 | + modelBuilder.Entity("STW.SurveyAppWithMVCBlazer.Models.Answer", b => |
| 25 | + { |
| 26 | + b.Property<int>("Id") |
| 27 | + .ValueGeneratedOnAdd() |
| 28 | + .HasColumnType("int"); |
| 29 | + |
| 30 | + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); |
| 31 | + |
| 32 | + b.Property<bool>("IsValidAnswer") |
| 33 | + .HasColumnType("bit"); |
| 34 | + |
| 35 | + b.Property<int>("QuestionId") |
| 36 | + .HasColumnType("int"); |
| 37 | + |
| 38 | + b.Property<string>("Text") |
| 39 | + .HasColumnType("nvarchar(max)"); |
| 40 | + |
| 41 | + b.HasKey("Id"); |
| 42 | + |
| 43 | + b.HasIndex("QuestionId") |
| 44 | + .IsUnique(); |
| 45 | + |
| 46 | + b.ToTable("Answers"); |
| 47 | + }); |
| 48 | + |
| 49 | + modelBuilder.Entity("STW.SurveyAppWithMVCBlazer.Models.Question", b => |
| 50 | + { |
| 51 | + b.Property<int>("Id") |
| 52 | + .ValueGeneratedOnAdd() |
| 53 | + .HasColumnType("int"); |
| 54 | + |
| 55 | + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("Id"), 1L, 1); |
| 56 | + |
| 57 | + b.Property<int>("Order") |
| 58 | + .HasColumnType("int"); |
| 59 | + |
| 60 | + b.Property<string>("Text") |
| 61 | + .HasColumnType("nvarchar(max)"); |
| 62 | + |
| 63 | + b.HasKey("Id"); |
| 64 | + |
| 65 | + b.ToTable("Questions"); |
| 66 | + }); |
| 67 | + |
| 68 | + modelBuilder.Entity("STW.SurveyAppWithMVCBlazer.Models.Answer", b => |
| 69 | + { |
| 70 | + b.HasOne("STW.SurveyAppWithMVCBlazer.Models.Question", "Question") |
| 71 | + .WithOne("Answer") |
| 72 | + .HasForeignKey("STW.SurveyAppWithMVCBlazer.Models.Answer", "QuestionId") |
| 73 | + .OnDelete(DeleteBehavior.Cascade) |
| 74 | + .IsRequired(); |
| 75 | + |
| 76 | + b.Navigation("Question"); |
| 77 | + }); |
| 78 | + |
| 79 | + modelBuilder.Entity("STW.SurveyAppWithMVCBlazer.Models.Question", b => |
| 80 | + { |
| 81 | + b.Navigation("Answer") |
| 82 | + .IsRequired(); |
| 83 | + }); |
| 84 | +#pragma warning restore 612, 618 |
| 85 | + } |
| 86 | + } |
| 87 | +} |
0 commit comments