Пример #1
0
        public static UM_AttributeType ToEntity(this AttributeTypeContract contract)
        {
            if (contract == null)
            {
                return(null);
            }

            var entity = new UM_AttributeType();

            entity.DateChanged = contract.DateChanged;
            entity.DateCreated = contract.DateCreated;
            entity.DateDeleted = contract.DateDeleted;
            entity.ID          = contract.ID;
            entity.Name        = contract.Name;
            entity.ProjectID   = contract.ProjectID;

            return(entity);
        }
Пример #2
0
        public static AttributeTypeContract ToContract(this UM_AttributeType entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var contract = new AttributeTypeContract();

            contract.DateChanged = entity.DateChanged;
            contract.DateCreated = entity.DateCreated;
            contract.DateDeleted = entity.DateDeleted;
            contract.ID          = entity.ID;
            contract.Name        = entity.Name;
            contract.ProjectID   = entity.ProjectID;

            return(contract);
        }