Пример #1
0
        public static StoreDTO MapToDTO(StoreDAO store)
        {
            var s = new StoreDTO();

            s.Id          = store.Id;
            s.Address     = AddressMapper.MapToDTO(store.Address);
            s.PhoneNumber = PhoneMapper.MapToDTO(store.PhoneNumber);
            s.Hours       = HoursMapper.MapToDTO(store.Hours);
            s.Active      = store.Active;

            return(s);
        }
Пример #2
0
        public static CustomerDTO MapToDTO(CustomerDAO customer)
        {
            var c = new CustomerDTO();

            c.Id      = customer.Id;
            c.Name    = NameMapper.MapToDTO(customer.Name);
            c.Address = AddressMapper.MapToDTO(customer.Address);
            c.Email   = EmailMapper.MapToDTO(customer.Email);
            c.Phone   = PhoneMapper.MapToDTO(customer.Phone);
            c.Active  = customer.Active;

            return(c);
        }