Ejemplo n.º 1
0
        public static Store MapToStore(StoreDAO store)
        {
            var s = new Store();

            s.StoreID   = store.Id;
            s.AddressID = AddressDetailMapper.MapToAddressDetail(store.Address).AddressID;
            s.PhoneID   = PhoneMapper.MapToPhone(store.PhoneNumber).PhoneID;
            s.HoursID   = StoreHourMapper.MapToStoreHour(store.Hours).HoursID;
            s.Active    = store.Active;

            return(s);
        }
Ejemplo n.º 2
0
        public static StoreDAO MapToStoreDAO(Store store)
        {
            var s = new StoreDAO();

            s.Id          = store.StoreID;
            s.Address     = AddressDetailMapper.MapToAddressDetailDAO(store.AddressDetail);
            s.PhoneNumber = PhoneMapper.MapToPhoneDAO(store.Phone);
            s.Hours       = StoreHourMapper.MapToStoreHourDAO(store.StoreHour);
            s.Active      = store.Active;

            return(s);
        }
        public static Customer MapToCustomer(CustomerDAO customer)
        {
            var c = new Customer();

            c.CustomerID = customer.Id;
            c.NameID     = NameMapper.MapToName(customer.Name).NameID;
            c.AddressID  = AddressDetailMapper.MapToAddressDetail(customer.Address).AddressID;
            c.EmailID    = EmailMapper.MapToEmail(customer.Email).EmailID;
            c.PhoneID    = PhoneMapper.MapToPhone(customer.Phone).PhoneID;
            c.Active     = customer.Active;

            return(c);
        }
        public static CustomerDAO MapToCustomerDAO(Customer customer)
        {
            var c = new CustomerDAO();

            c.Id      = customer.CustomerID;
            c.Name    = NameMapper.MapToNameDAO(customer.Name);
            c.Address = AddressDetailMapper.MapToAddressDetailDAO(customer.AddressDetail);
            c.Email   = EmailMapper.MapToEmailDAO(customer.Email);
            c.Phone   = PhoneMapper.MapToPhoneDAO(customer.Phone);
            c.Active  = customer.Active;

            return(c);
        }