public static coreModel.OperationProperty ToCoreModel(this webModel.OperationProperty property)
		{
			var retVal = new coreModel.OperationProperty();
			retVal.InjectFrom(property);

			retVal.ValueType = property.ValueType;
			retVal.Value = property.Value;

			return retVal;
		}
Esempio n. 2
0
        public static coreModel.OperationProperty ToCoreModel(this webModel.OperationProperty property)
        {
            var retVal = new coreModel.OperationProperty();

            retVal.InjectFrom(property);

            retVal.ValueType = property.ValueType;
            retVal.Value     = property.Value;

            return(retVal);
        }
		/// <summary>
		/// Converting to model type
		/// </summary>
		/// <param name="catalogBase"></param>
		/// <returns></returns>
		public static coreModel.OperationProperty ToCoreModel(this dataModel.OperationPropertyEntity dbEntity)
		{
			if (dbEntity == null)
				throw new ArgumentNullException("dbEntity");

			var retVal = new coreModel.OperationProperty();
			retVal.InjectFrom(dbEntity);
			retVal.ValueType = (coreModel.PropertyValueType)Enum.Parse(typeof(coreModel.PropertyValueType), dbEntity.ValueType, true);
			retVal.Value = dbEntity.RawValue();
			return retVal;

		}
        /// <summary>
        /// Converting to model type
        /// </summary>
        /// <param name="catalogBase"></param>
        /// <returns></returns>
        public static coreModel.OperationProperty ToCoreModel(this dataModel.OperationPropertyEntity dbEntity)
        {
            if (dbEntity == null)
            {
                throw new ArgumentNullException("dbEntity");
            }

            var retVal = new coreModel.OperationProperty();

            retVal.InjectFrom(dbEntity);
            retVal.ValueType = (coreModel.PropertyValueType)Enum.Parse(typeof(coreModel.PropertyValueType), dbEntity.ValueType, true);
            retVal.Value     = dbEntity.RawValue();
            return(retVal);
        }