Ejemplo n.º 1
0
 public static Buyer FromRepoBuyerToBuyer(this RepoBuyer item)
 {
     Mapper.Initialize(cfg => cfg.CreateMap <RepoBuyer, Buyer>()
                       .ForMember(x => x.BuyCars, _ => _.Ignore())
                       .ForMember(x => x.Cars, x => x.Ignore()));
     return(Mapper.Map <RepoBuyer, Buyer>(item));
 }
Ejemplo n.º 2
0
 public static DomainBuyer FromRepoBuyerToDomainBuyer(this RepoBuyer item)
 {
     if (item == null)
     {
         return(null);
     }
     return(new DomainBuyer
     {
         Id = item.Id,
         Email = item.Email,
     });
 }