Rebel.Cms.Web.RebelHelper.GetPreValueModel C# (CSharp) Method

GetPreValueModel() public method

Gets the pre value model for the datatype with the specified id.
public GetPreValueModel ( HiveId dataTypeId ) : PreValueModel
dataTypeId HiveId The data type id.
return PreValueModel
        public PreValueModel GetPreValueModel(HiveId dataTypeId)
        {
            using (var uow = _requestContext.Application.Hive.OpenReader<IContentStore>())
            {
                var dataTypeEntity = uow.Repositories.Schemas.Get<AttributeType>(dataTypeId);
                if (dataTypeEntity == null)
                    throw new ArgumentException(string.Format("No AttributeType found for id: {0} on action Edit", dataTypeId));

                var dataType = _requestContext.Application.FrameworkContext.TypeMappers.Map<AttributeType, DataType>(dataTypeEntity);
                return dataType.GetPreValueModel();
            }
        }

Same methods

RebelHelper::GetPreValueModel ( string dataTypeId ) : PreValueModel