Exemplo n.º 1
0
        public static AttributeValueContract ToContract(this UM_AttributeValue entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var contract = new AttributeValueContract();

            contract.DateChanged      = entity.DateChanged;
            contract.DateCreated      = entity.DateCreated;
            contract.DateDeleted      = entity.DateDeleted;
            contract.ID               = entity.ID;
            contract.AttributeFieldID = entity.AttributeFieldID;

            return(contract);
        }
Exemplo n.º 2
0
        public static UM_AttributeValue ToEntity(this AttributeValueContract contract)
        {
            if (contract == null)
            {
                return(null);
            }

            var entity = new UM_AttributeValue();

            entity.DateChanged      = contract.DateChanged;
            entity.DateCreated      = contract.DateCreated;
            entity.DateDeleted      = contract.DateDeleted;
            entity.ID               = contract.ID;
            entity.ParentID         = contract.ParentID;
            entity.AttributeFieldID = contract.AttributeFieldID;
            entity.Value            = contract.Value;

            return(entity);
        }