• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class DataService

Persistent data of content with DataProvider instance.

Inheritance
System.Object
DataService
Implements
IDataService
Namespace: DotNetNuke.Entities.Content.Data
Assembly: DotNetNuke.dll
Syntax
public class DataService : object, IDataService
Remarks

It's better to use GetDataService() instead of create new instance directly.

Examples
public ContentController() : this(Util.GetDataService())
{
}
public ContentController(IDataService dataService)
{
    _dataService = dataService;
}

Methods

| Improve this Doc View Source

AddContentItem(ContentItem, Int32)

Adds the content item.

Declaration
public int AddContentItem(ContentItem contentItem, int createdByUserId)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.Int32 createdByUserId

The created by user id.

Returns
Type Description
System.Int32

content item id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddContentType(ContentType)

Adds the type of the content.

Declaration
public int AddContentType(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

Type of the content.

Returns
Type Description
System.Int32

content type id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddHeirarchicalTerm(Term, Int32)

Adds the hierarchical term.

Declaration
public int AddHeirarchicalTerm(Term term, int createdByUserId)
Parameters
Type Name Description
Term term

The term.

System.Int32 createdByUserId

The created by user id.

Returns
Type Description
System.Int32

term id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddMetaData(ContentItem, String, String)

Adds the meta data.

Declaration
public void AddMetaData(ContentItem contentItem, string name, string value)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.String name

The name.

System.String value

The value.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddScopeType(ScopeType)

Adds the type of the scope.

Declaration
public int AddScopeType(ScopeType scopeType)
Parameters
Type Name Description
ScopeType scopeType

Type of the scope.

Returns
Type Description
System.Int32

scope type id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddSimpleTerm(Term, Int32)

Adds the simple term.

Declaration
public int AddSimpleTerm(Term term, int createdByUserId)
Parameters
Type Name Description
Term term

The term.

System.Int32 createdByUserId

The created by user id.

Returns
Type Description
System.Int32

term id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddTermToContent(Term, ContentItem)

Persistent data of content with DataProvider instance.

Declaration
public void AddTermToContent(Term term, ContentItem contentItem)
Parameters
Type Name Description
Term term
ContentItem contentItem
Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

AddVocabulary(Vocabulary, Int32)

Adds the vocabulary.

Declaration
public int AddVocabulary(Vocabulary vocabulary, int createdByUserId)
Parameters
Type Name Description
Vocabulary vocabulary

The vocabulary.

System.Int32 createdByUserId

The created by user id.

Returns
Type Description
System.Int32

Vocabulary id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteContentItem(Int32)

Deletes the content item.

Declaration
public void DeleteContentItem(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item ID.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteContentType(ContentType)

Persistent data of content with DataProvider instance.

Declaration
public void DeleteContentType(ContentType contentType)
Parameters
Type Name Description
ContentType contentType
Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteHeirarchicalTerm(Term)

Deletes the hierarchical term.

Declaration
public void DeleteHeirarchicalTerm(Term term)
Parameters
Type Name Description
Term term

The term.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteMetaData(ContentItem, String, String)

Deletes the meta data.

Declaration
public void DeleteMetaData(ContentItem contentItem, string name, string value)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.String name

The name.

System.String value

The value.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteScopeType(ScopeType)

Deletes the type of the scope.

Declaration
public void DeleteScopeType(ScopeType scopeType)
Parameters
Type Name Description
ScopeType scopeType

Type of the scope.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteSimpleTerm(Term)

Deletes the simple term.

Declaration
public void DeleteSimpleTerm(Term term)
Parameters
Type Name Description
Term term

The term.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

DeleteVocabulary(Vocabulary)

Deletes the vocabulary.

Declaration
public void DeleteVocabulary(Vocabulary vocabulary)
Parameters
Type Name Description
Vocabulary vocabulary

The vocabulary.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItem(Int32)

Gets the content item.

Declaration
public IDataReader GetContentItem(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItems(Int32, Int32, Int32)

Gets the content items.

Declaration
public IDataReader GetContentItems(int contentTypeId, int tabId, int moduleId)
Parameters
Type Name Description
System.Int32 contentTypeId

The Id of the Content Type.

System.Int32 tabId

The Id of the Tab.

System.Int32 moduleId

The Id of the Module.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItemsByContentType(Int32)

Get a list of content items of the specified content type, contentTypeId.

Declaration
public IDataReader GetContentItemsByContentType(int contentTypeId)
Parameters
Type Name Description
System.Int32 contentTypeId

The type of content items you are searching for.

Returns
Type Description
IDataReader

A data reader containing the content items.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItemsByModuleId(Int32)

Retrieve all content items associated with a articular Module ID, moduleId.

Declaration
public IDataReader GetContentItemsByModuleId(int moduleId)
Parameters
Type Name Description
System.Int32 moduleId
Returns
Type Description
IDataReader

A data reader containing the content items.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItemsByTabId(Int32)

Get a list of content items based on TabID (PageID).

Declaration
public IDataReader GetContentItemsByTabId(int tabId)
Parameters
Type Name Description
System.Int32 tabId

The TabID (or "Page ID") that the content items are associated with.

Returns
Type Description
IDataReader

A data reader containing the content items.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItemsByTerm(String)

Gets the content items by term.

Declaration
public IDataReader GetContentItemsByTerm(string term)
Parameters
Type Name Description
System.String term

The term.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentItemsByVocabularyId(Int32)

Retrieve a list of content items containing terms from the specified Vocabulary ID.

Declaration
public IDataReader GetContentItemsByVocabularyId(int vocabularyId)
Parameters
Type Name Description
System.Int32 vocabularyId
Returns
Type Description
IDataReader

A data reader containing the content items.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetContentTypes()

Gets the content types.

Declaration
public IDataReader GetContentTypes()
Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetMetaData(Int32)

Gets the meta data.

Declaration
public IDataReader GetMetaData(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetScopeTypes()

Gets the scope types.

Declaration
public IDataReader GetScopeTypes()
Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetTerm(Int32)

Gets the term.

Declaration
public IDataReader GetTerm(int termId)
Parameters
Type Name Description
System.Int32 termId

The term id.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetTermsByContent(Int32)

Gets the content of the terms by.

Declaration
public IDataReader GetTermsByContent(int contentItemId)
Parameters
Type Name Description
System.Int32 contentItemId

The content item id.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetTermsByVocabulary(Int32)

Gets the terms by vocabulary.

Declaration
public IDataReader GetTermsByVocabulary(int vocabularyId)
Parameters
Type Name Description
System.Int32 vocabularyId

The vocabulary id.

Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetTermUsage(Int32)

Retrieve term usage data for the specified Term ID, termId.

Declaration
public IDataReader GetTermUsage(int termId)
Parameters
Type Name Description
System.Int32 termId
Returns
Type Description
IDataReader

A data reader with the term usage.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetUnIndexedContentItems()

Gets the un indexed content items.

Declaration
public IDataReader GetUnIndexedContentItems()
Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

GetVocabularies()

Gets the vocabularies.

Declaration
public IDataReader GetVocabularies()
Returns
Type Description
IDataReader

data reader.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

RemoveTermsFromContent(ContentItem)

Removes the content of the terms from.

Declaration
public void RemoveTermsFromContent(ContentItem contentItem)
Parameters
Type Name Description
ContentItem contentItem

The content item.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

SynchronizeMetaData(ContentItem, IEnumerable<KeyValuePair<String, String>>, IEnumerable<KeyValuePair<String, String>>)

Persistent data of content with DataProvider instance.

Declaration
public void SynchronizeMetaData(ContentItem contentItem, IEnumerable<KeyValuePair<string, string>> added, IEnumerable<KeyValuePair<string, string>> deleted)
Parameters
Type Name Description
ContentItem contentItem
IEnumerable<KeyValuePair<System.String, System.String>> added
IEnumerable<KeyValuePair<System.String, System.String>> deleted
Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateContentItem(ContentItem, Int32)

Updates the content item.

Declaration
public void UpdateContentItem(ContentItem contentItem, int createdByUserId)
Parameters
Type Name Description
ContentItem contentItem

The content item.

System.Int32 createdByUserId

The created by user id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateContentType(ContentType)

Updates the type of the content.

Declaration
public void UpdateContentType(ContentType contentType)
Parameters
Type Name Description
ContentType contentType

Type of the content.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateHeirarchicalTerm(Term, Int32)

Updates the hierarchical term.

Declaration
public void UpdateHeirarchicalTerm(Term term, int lastModifiedByUserId)
Parameters
Type Name Description
Term term

The term.

System.Int32 lastModifiedByUserId

The last modified by user id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateScopeType(ScopeType)

Updates the type of the scope.

Declaration
public void UpdateScopeType(ScopeType scopeType)
Parameters
Type Name Description
ScopeType scopeType

Type of the scope.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateSimpleTerm(Term, Int32)

Updates the simple term.

Declaration
public void UpdateSimpleTerm(Term term, int lastModifiedByUserId)
Parameters
Type Name Description
Term term

The term.

System.Int32 lastModifiedByUserId

The last modified by user id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

| Improve this Doc View Source

UpdateVocabulary(Vocabulary, Int32)

Updates the vocabulary.

Declaration
public void UpdateVocabulary(Vocabulary vocabulary, int lastModifiedByUserId)
Parameters
Type Name Description
Vocabulary vocabulary

The vocabulary.

System.Int32 lastModifiedByUserId

The last modified by user id.

Remarks

It's better to use GetDataService() instead of create new instance directly.

Implements

IDataService

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS