Interface IContentRepository
- Namespace
- Biwen.QuickApi.Contents.Abstractions
- Assembly
- Biwen.QuickApi.Contents.dll
public interface IContentRepository
- Extension Methods
-
Methods
DeleteContentAsync(Guid)
Task DeleteContentAsync(Guid id)
Parameters
id
Guid
Returns
- Task
GetContentAsync<T>(Guid)
Task<T?> GetContentAsync<T>(Guid id) where T : IContent, new()
Parameters
id
Guid
Returns
- Task<T>
Type Parameters
T
GetContentIdBySlugAsync(string)
Task<Content?> GetContentIdBySlugAsync(string slug)
Parameters
slug
string
Returns
- Task<Content>
GetContentSchema<T>()
string GetContentSchema<T>() where T : IContent
Returns
- string
Type Parameters
T
GetContentsByTypeAsync<T>(int, int)
Task<IPagedList<T>> GetContentsByTypeAsync<T>(int pageIndex = 0, int len = 10) where T : IContent, new()
Parameters
pageIndex
int
len
int
Returns
- Task<IPagedList<T>>
Type Parameters
T
GetContentsByTypeAsync<T>(string)
Task<T?> GetContentsByTypeAsync<T>(string slug) where T : IContent, new()
Parameters
slug
string
Returns
- Task<T>
Type Parameters
T
GetDomainContentsByTypeAsync<T>(string?, int, int, int?, string?)
Task<IPagedList<Content>> GetDomainContentsByTypeAsync<T>(string? slug = null, int pageIndex = 0, int len = 10, int? status = null, string? title = null) where T : IContent, new()
Parameters
slug
string
pageIndex
int
len
int
status
int?
title
string
Returns
- Task<IPagedList<Content>>
Type Parameters
T
GetRawContentAsync(Guid)
Task<Content> GetRawContentAsync(Guid id)
Parameters
id
Guid
Returns
- Task<Content>
SaveContentAsync<T>(T, string?, string?)
Task<Guid> SaveContentAsync<T>(T content, string? title = null, string? slug = null) where T : IContent
Parameters
content
T
title
string
slug
string
Returns
- Task<Guid>
Type Parameters
T
SetContentStatusAsync(Guid, ContentStatus)
Task SetContentStatusAsync(Guid id, ContentStatus status)
Parameters
id
Guid
status
ContentStatus
Returns
- Task
UpdateContentAsync<T>(Guid, T)
Task UpdateContentAsync<T>(Guid id, T content) where T : IContent
Parameters
id
Guid
content
T
Returns
- Task
Type Parameters
T
UpdateRawContentAsync(Content, bool, int)
Task UpdateRawContentAsync(Content content, bool isRollback = false, int version = 0)
Parameters
content
Content
isRollback
bool
version
int
Returns
- Task