Entity:
public sealed class Table
{
public Table()
{
this.Entities1 = new List<Entities1>();
}
public int Id { get; set; }
public string Field1{ get; set; }
public string Field2{get; set; }
public string Field3 { get; set; }
public string Field4 { get; set; }
public string Field5 {get; set; }
public Entities3 Entities3 { get; set; }
public ICollection<Entities1> Entities1{ get; set; }
public ICollection<Entities2> Entities2{ get; set; }
}
On 1 October 2015 at 13:53, Геннадий Забула <[email protected]> wrote:
> We map the entities through EntityTypeConfiguration class:
>
> Src table mapping:
> this.HasKey(t => t.Id);
>
> // Properties
> // Table & Column Mappings
> this.ToTable("TABLE2");
> this.Property(t => t.Id).HasColumnName("ID");
> this.Property(x => x.Field1).HasColumnName("FIELD1");
> this.Property(x => x.Field2).HasColumnName("FIELD2");
> this.Property(x => x.Field3).HasColumnName("FIELD3");
> this.Property(x => x.Field4).HasColumnName("FIELD4");
> this.Property(x => x.Field5).HasColumnName("FIELD5");
>
> Dst table mapping inherits from above:
>
> :base()
> {
> Property(x =>
> x.Id).HasDatabaseGeneratedOption(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.None);
> }
>
> On 1 October 2015 at 13:38, Jiří Činčura <[email protected]> wrote:
>> How does the entity and mapping looks like?
>>
>> --
>> Mgr. Jiří Činčura
>> Independent IT Specialist
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Firebird-net-provider mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/firebird-net-provider
------------------------------------------------------------------------------
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider