Dus in plaats van GetSequence
gebruik een eigenschap:
public class InvoiceNumberSequence {
public string Prefix { get; set; }
public int Number { get; set; }
public string Sequence {
get { retrun Prefix + Number; }
set { // Add your parsing logic }
}
}
En voeg in mapping toe:
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Property(p => p.Sequence)
.HasColumnName("INVOICE_SEQ");
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Ignore(p => p.Prefix);
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Ignore(p => p.Number);