Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.14 KB | None | 0 0
  1. namespace UTourExample.API.Migrations
  2. {
  3. [DbContext(typeof(UTourContext))]
  4. partial class UTourContextModelSnapshot : ModelSnapshot
  5. {
  6. protected override void BuildModel(ModelBuilder modelBuilder)
  7. {
  8. modelBuilder
  9. .HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
  10. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  11.  
  12. modelBuilder.Entity("UTourExample.API.Entities.Place", b =>
  13. {
  14. b.Property<int>("Id")
  15. .ValueGeneratedOnAdd()
  16. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  17.  
  18. b.Property<string>("Description")
  19. .HasMaxLength(200);
  20.  
  21. b.Property<string>("Name")
  22. .IsRequired()
  23. .HasMaxLength(100);
  24.  
  25. b.Property<int>("TourId");
  26.  
  27. b.HasKey("Id");
  28.  
  29. b.HasIndex("TourId");
  30.  
  31. b.ToTable("Places");
  32. });
  33.  
  34. modelBuilder.Entity("UTourExample.API.Entities.Tour", b =>
  35. {
  36. b.Property<int>("Id")
  37. .ValueGeneratedOnAdd()
  38. .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  39.  
  40. b.Property<string>("Description")
  41. .HasMaxLength(200);
  42.  
  43. b.Property<string>("Name")
  44. .IsRequired()
  45. .HasMaxLength(100);
  46.  
  47. b.Property<int>("Status");
  48.  
  49. b.HasKey("Id");
  50.  
  51. b.ToTable("Tours");
  52. });
  53.  
  54. modelBuilder.Entity("UTourExample.API.Entities.Place", b =>
  55. {
  56. b.HasOne("UTourExample.API.Entities.Tour", "Tour")
  57. .WithMany("Places")
  58. .HasForeignKey("TourId")
  59. .OnDelete(DeleteBehavior.Cascade);
  60. });
  61. }
  62. }
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement