//---------------------------------------------------------------------------------------------
// This file was AUTO-GENERATED by "EF Domain Objects" Xomega.Net generator.
//
// Manual CHANGES to this file WILL BE LOST when the code is regenerated.
//---------------------------------------------------------------------------------------------

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace AdventureWorks.Services.Entities
{
    public class LocationConfig : IEntityTypeConfiguration<Location>
    {
        public void Configure(EntityTypeBuilder<Location> c)
        {
            c.ToTable("Location", "Production")
             .HasKey(e => e.LocationId);

            // configure properties
          
            c.Property(e => e.LocationId)
             .HasColumnName("LocationID")
             .HasColumnType("smallint")
             .IsRequired()
             .ValueGeneratedOnAdd();

            c.Property(e => e.Name)
             .HasColumnName("Name")
             .HasColumnType("nvarchar")
             .HasMaxLength(50)
             .IsUnicode()
             .IsRequired();

            c.Property(e => e.CostRate)
             .HasColumnName("CostRate")
             .HasColumnType("smallmoney")
             .IsRequired();

            c.Property(e => e.Availability)
             .HasColumnName("Availability")
             .HasColumnType("decimal(8,2)")
             .IsRequired();

            c.Property(e => e.ModifiedDate)
             .HasColumnName("ModifiedDate")
             .HasColumnType("datetime")
             .IsRequired();

        }
    }
}