InvoiceMap.cs 690 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Data.Entity.ModelConfiguration;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace GreenTree.Nachtragsmanagement.Data.Mapping.Deviation
  8. {
  9. public class InvoiceMap : EntityTypeConfiguration<Core.Domain.Invoice.Invoice>
  10. {
  11. public InvoiceMap()
  12. {
  13. ToTable("Invoice");
  14. HasKey(f => f.Id);
  15. Property(f => f.CustomNumber);
  16. Property(f => f.Date);
  17. Property(f => f.Value);
  18. HasOptional(i => i.Appendix)
  19. .WithMany(a => a.Invoices)
  20. .HasForeignKey(i => i.AppendixId);
  21. }
  22. }
  23. }