Esempio n. 1
0
        /// <summary>
        /// Gets the content type with the specified content type identifier.
        /// </summary>
        /// <param name="id">The content type identifier.</param>
        /// <returns>The content type with the specified content type identifier.</returns>
        internal virtual ContentType GetContentTypeByContentTypeId(int id)
        {
            if (!_databaseWrapper.TableExists <ContentType>())
            {
                return(null);
            }

            var sql = new Sql().Where <ContentType>(ct => ct.ContentTypeId == id);

            return(_databaseWrapper.Get <ContentType>(sql));
        }
Esempio n. 2
0
        /// <summary>
        /// Gets the definition with the specified definition identifier.
        /// </summary>
        /// <param name="id">The definition identifier.</param>
        /// <returns>The definition with the specified definition identifier.</returns>
        internal virtual DataType GetDefinitionByDefinitionId(int id)
        {
            if (!_databaseWrapper.TableExists <DataType>())
            {
                return(null);
            }

            var sql = new Sql().Where <DataType>(ct => ct.DefinitionId == id);

            return(_databaseWrapper.Get <DataType>(sql));
        }