You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.7 KiB

  1. // <auto-generated />
  2. using System;
  3. using EF_Code_First.Models;
  4. using Microsoft.EntityFrameworkCore;
  5. using Microsoft.EntityFrameworkCore.Infrastructure;
  6. using Microsoft.EntityFrameworkCore.Migrations;
  7. using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
  8. #nullable disable
  9. namespace EF_Code_First.Migrations
  10. {
  11. [DbContext(typeof(SC_DbContext))]
  12. [Migration("20220313151637_V0.2")]
  13. partial class V02
  14. {
  15. protected override void BuildTargetModel(ModelBuilder modelBuilder)
  16. {
  17. #pragma warning disable 612, 618
  18. modelBuilder.HasAnnotation("ProductVersion", "6.0.3");
  19. modelBuilder.Entity("EF_Code_First.Models.Grade", b =>
  20. {
  21. b.Property<int>("GradeId")
  22. .ValueGeneratedOnAdd()
  23. .HasColumnType("INTEGER");
  24. b.Property<string>("GradeName")
  25. .HasColumnType("TEXT");
  26. b.Property<string>("Section")
  27. .HasColumnType("TEXT");
  28. b.HasKey("GradeId");
  29. b.ToTable("Grades");
  30. });
  31. modelBuilder.Entity("EF_Code_First.Models.Student", b =>
  32. {
  33. b.Property<int>("StudentId")
  34. .ValueGeneratedOnAdd()
  35. .HasColumnType("INTEGER");
  36. b.Property<DateTime?>("DateOfBirth")
  37. .HasColumnType("TEXT");
  38. b.Property<int>("GradeId")
  39. .HasColumnType("INTEGER");
  40. b.Property<decimal?>("Height")
  41. .HasColumnType("TEXT");
  42. b.Property<byte[]>("Photo")
  43. .HasColumnType("BLOB");
  44. b.Property<string>("StudentName")
  45. .HasColumnType("TEXT");
  46. b.Property<float?>("Weight")
  47. .HasColumnType("REAL");
  48. b.HasKey("StudentId");
  49. b.HasIndex("GradeId");
  50. b.ToTable("Students");
  51. });
  52. modelBuilder.Entity("EF_Code_First.Models.Student", b =>
  53. {
  54. b.HasOne("EF_Code_First.Models.Grade", "Grade")
  55. .WithMany("Students")
  56. .HasForeignKey("GradeId")
  57. .OnDelete(DeleteBehavior.Cascade)
  58. .IsRequired();
  59. b.Navigation("Grade");
  60. });
  61. modelBuilder.Entity("EF_Code_First.Models.Grade", b =>
  62. {
  63. b.Navigation("Students");
  64. });
  65. #pragma warning restore 612, 618
  66. }
  67. }
  68. }