Advertisement
Guest User

Untitled

a guest
May 5th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public class Policy
  2. {
  3. public int Id { get; set; }
  4. public int EntityId { get; set; }
  5. public int ProgramId { get; set; }
  6.  
  7. public string PolicyNumber { get; set; }
  8. public DateTime EffectiveDate { get; set; }
  9. public DateTime ExpirationDate { get; set; }
  10.  
  11. public virtual Entity Entity{ get; set; }
  12. public virtual Program Program { get; set; }
  13. public virtual ICollection<Transaction> Transactions { get; set; }
  14. }
  15.  
  16. public sealed class PolicyMapper : ClassMapper<Policy>
  17. {
  18. public PolicyMapper()
  19. {
  20. Map(p => p.Entity).Ignore();
  21. Map(p => p.Program).Ignore();
  22. Map(p => p.Transactions).Ignore();
  23. AutoMap();
  24. }
  25. }
  26.  
  27. public sealed class PolicyMapper : ClassMapper<Policy>
  28. {
  29. public PolicyMapper()
  30. {
  31. IgnoreAllVirtual();
  32. AutoMap();
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement