Class MongoShortenedUrlRepository
Inheritance
MongoShortenedUrlRepository
Implements
Inherited Members
Namespace: Volo.CmsKit.UrlShorting
Assembly: Volo.CmsKit.Pro.MongoDB.dll
Syntax
public class MongoShortenedUrlRepository : MongoDbRepository<ICmsKitProMongoDbContext, ShortenedUrl, Guid>, IServiceProviderAccessor, IUnitOfWorkEnabled, IUnitOfWorkManagerAccessor, IMongoDbRepository<ShortenedUrl, Guid>, IMongoDbRepository<ShortenedUrl>, IRepository<ShortenedUrl, Guid>, IRepository<ShortenedUrl>, IReadOnlyRepository<ShortenedUrl, Guid>, IReadOnlyRepository<ShortenedUrl>, IBasicRepository<ShortenedUrl, Guid>, IShortenedUrlRepository, IBasicRepository<ShortenedUrl, Guid>, IBasicRepository<ShortenedUrl>, IReadOnlyBasicRepository<ShortenedUrl, Guid>, IReadOnlyBasicRepository<ShortenedUrl>, IRepository
Constructors
MongoShortenedUrlRepository(IMongoDbContextProvider<ICmsKitProMongoDbContext>)
Declaration
public MongoShortenedUrlRepository(IMongoDbContextProvider<ICmsKitProMongoDbContext> dbContextProvider)
Parameters
Type | Name | Description |
---|---|---|
IMongoDbContextProvider<ICmsKitProMongoDbContext> | dbContextProvider |
Methods
FindBySourceUrlAsync(string, CancellationToken)
Declaration
public virtual Task<ShortenedUrl> FindBySourceUrlAsync(string sourceUrl, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | sourceUrl | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<ShortenedUrl> |
GetAllRegexAsync(CancellationToken)
Declaration
public Task<List<ShortenedUrl>> GetAllRegexAsync(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ShortenedUrl>> |
GetCountAsync(string, CancellationToken)
Declaration
public virtual Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | filter | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<long> |
GetListAsync(string, string, int, int, CancellationToken)
Declaration
public virtual Task<List<ShortenedUrl>> GetListAsync(string filter = null, string sorting = null, int skipCount = 0, int maxResultCount = 2147483647, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | filter | |
string | sorting | |
int | skipCount | |
int | maxResultCount | |
CancellationToken | cancellationToken |
Returns
Type | Description |
---|---|
Task<List<ShortenedUrl>> |