コード例 #1
0
 /// <summary>
 /// Turn an entity customer with their location into a model customer
 /// </summary>
 /// <param name="customer"></param>
 /// <returns></returns>
 public static Library.Models.Customer MapCustomerWithLocation(Entities.CustomerEntity customer)
 {
     return(new Library.Models.Customer
     {
         FirstName = customer.FirstName,
         LastName = customer.LastName,
         ID = customer.Id,
         MyStoreLocation = Mapper_Location.MapLocationsWithInventory(customer.Location)
     });
 }
コード例 #2
0
 /// <summary>
 /// Turn a model customer with their location into a entity customer
 /// </summary>
 /// <param name="customer"></param>
 /// <returns></returns>
 public static Entities.CustomerEntity MapCustomerWithLocation(Library.Models.Customer customer)
 {
     return(new Entities.CustomerEntity
     {
         FirstName = customer.FirstName,
         LastName = customer.LastName,
         Id = customer.ID,
         Location = Mapper_Location.Map(customer.MyStoreLocation)
     });
 }