Beispiel #1
0
        internal static models.Telephone MapTelephoneToModel(this entities.Telephone m)
        {
            var e = new models.Telephone
            {
                ID     = m.ID,
                Number = m.Number,
                Type   = m.Type
            };

            return(e);
        }
Beispiel #2
0
        internal static entities.Telephone MapTelephoneToEntity(this models.Telephone m)
        {
            var e = new entities.Telephone
            {
                Number = m.Number,
                Type   = m.Type
            };

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