Så i stedet for GetSequence
brug en egenskab:
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 }
}
}
Og i kortlægning tilføj:
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Property(p => p.Sequence)
.HasColumnName("INVOICE_SEQ");
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Ignore(p => p.Prefix);
modelBuilder.ComplexType<InvoiceNumberSequence>()
.Ignore(p => p.Number);