Example #1
0
        internal static models.Address MapAddressToModel(this entities.Address m)
        {
            var e = new models.Address
            {
                City       = m.City,
                Complement = m.Complement,
                Country    = m.Country,
                ID         = m.ID,
                State      = m.State,
                Street     = m.Street,
                Type       = m.Type
            };

            return(e);
        }
Example #2
0
        internal static entities.Address MapAddressToEntity(this models.Address m)
        {
            var e = new entities.Address
            {
                City       = m.City,
                Complement = m.Complement,
                Country    = m.Country,
                State      = m.State,
                Street     = m.Street,
                Type       = m.Type
            };

            if (!string.IsNullOrWhiteSpace(m.ID))
            {
                e.ID = m.ID;
            }

            return(e);
        }