示例#1
0
            public static void Configurar(EntityTypeBuilder <Cliente> entityBuilder)
            {
                PessoaConfiguracao <Cliente> .Configurar(entityBuilder);

                entityBuilder
                .ToTable("customer")
                .HasKey(c => c.Id)
                .HasName("pk_customer");

                entityBuilder
                .Property(c => c.Id)
                .HasColumnName("customer_id");

                entityBuilder
                .Property(c => c.DataCriacao)
                .HasColumnName("create_date");
            }
示例#2
0
            public static void Configurar(EntityTypeBuilder <Funcionario> entityBuilder)
            {
                PessoaConfiguracao <Funcionario> .Configurar(entityBuilder);

                entityBuilder
                .ToTable("staff")
                .HasKey(f => f.Id)
                .HasName("pk_staff");

                entityBuilder
                .Property(f => f.Id)
                .HasColumnName("staff_id");

                entityBuilder
                .Property(f => f.Login)
                .HasColumnName("username")
                .HasColumnType("varchar(16)");

                entityBuilder
                .Property(f => f.Senha)
                .HasColumnName("password")
                .HasColumnType("varchar(40");
            }