text: ﻿using System;
  using Microsoft.EntityFrameworkCore;
  using Microsoft.EntityFrameworkCore.Infrastructure;
  using Microsoft.EntityFrameworkCore.Metadata;
  using Microsoft.EntityFrameworkCore.Migrations;
  using Migrations.Context;
  
  namespace ComputedColumns.EF.Migrations
  {
      [DbContext(typeof(StoreContext))]
      partial class StoreContextModelSnapshot : ModelSnapshot
      {
          protected override void BuildModel(ModelBuilder modelBuilder)
          {
              modelBuilder
                  .HasAnnotation("ProductVersion", "1.1.0-rtm-22752")
                  .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  
              modelBuilder.Entity("ComputedColumns.Models.Order", b =>
                  {
                      b.Property<int>("Id")
                          .ValueGeneratedOnAdd()
                          .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  
                      b.Property<int>("CustomerId");
  
                      b.Property<DateTime>("OrderDate")
                          .ValueGeneratedOnAdd()
                          .HasColumnType("datetime")
                          .HasDefaultValueSql("getdate()");
  
                      b.Property<decimal?>("OrderTotal")
                          .ValueGeneratedOnAddOrUpdate()
                          .HasColumnType("money")
                          .HasComputedColumnSql("Store.GetOrderTotal([Id])");
  
                      b.Property<DateTime>("ShipDate")
                          .ValueGeneratedOnAdd()
                          .HasColumnType("datetime")
                          .HasDefaultValueSql("getdate()");
  
                      b.Property<byte[]>("TimeStamp")
                          .IsConcurrencyToken()
                          .ValueGeneratedOnAddOrUpdate();
  
                      b.HasKey("Id");
  
                      b.ToTable("Orders","Store");
                  });
  
              modelBuilder.Entity("ComputedColumns.Models.OrderDetail", b =>
                  {
                      b.Property<int>("Id")
                          .ValueGeneratedOnAdd()
                          .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
  
                      b.Property<decimal?>("LineItemTotal")
                          .ValueGeneratedOnAddOrUpdate()
                          .HasColumnType("money")
                          .HasComputedColumnSql("[Quantity]*[UnitCost]");
  
                      b.Property<int>("OrderId");
  
                      b.Property<int>("Quantity");
  
                      b.Property<byte[]>("TimeStamp")
                          .IsConcurrencyToken()
                          .ValueGeneratedOnAddOrUpdate();
  
                      b.Property<decimal>("UnitCost")
                          .HasColumnType("money");
  
                      b.HasKey("Id");
  
                      b.HasIndex("OrderId");
  
                      b.ToTable("OrderDetails","Store");
                  });
  
              modelBuilder.Entity("ComputedColumns.Models.OrderDetail", b =>
                  {
                      b.HasOne("ComputedColumns.Models.Order", "Order")
                          .WithMany("OrderDetails")
                          .HasForeignKey("OrderId")
                          .OnDelete(DeleteBehavior.Cascade);
                  });
          }
      }
  }
  