コード例 #1
0
        private static Persistence.EntityFramework.Entities.Customer Map(Persistence.EntityFramework.Entities.Customer customerDb, CustomerDetails modelCustomer)
        {
            customerDb.FullName   = modelCustomer.FullName;
            customerDb.Title      = modelCustomer.Title;
            customerDb.Address    = modelCustomer.Address;
            customerDb.City       = modelCustomer.City;
            customerDb.Country    = modelCustomer.Country;
            customerDb.Fax        = modelCustomer.Fax;
            customerDb.HomePhone  = modelCustomer.HomePhone;
            customerDb.PostalCode = modelCustomer.PostalCode;
            customerDb.Region     = modelCustomer.Region;

            return(customerDb);
        }
コード例 #2
0
 private static CustomerDetails Map(Persistence.EntityFramework.Entities.Customer dbcostumer)
 {
     return(new CustomerDetails()
     {
         CustomerId = dbcostumer.CustomerId,
         FullName = dbcostumer.FullName,
         Title = dbcostumer.Title,
         Address = dbcostumer.Address,
         City = dbcostumer.City,
         Country = dbcostumer.Country,
         Fax = dbcostumer.Fax,
         HomePhone = dbcostumer.HomePhone,
         PostalCode = dbcostumer.PostalCode,
         Region = dbcostumer.Region,
     });
 }