本文整理汇总了C#中IDatabaseUnitOfWork类的典型用法代码示例。如果您正苦于以下问题:C# IDatabaseUnitOfWork类的具体用法?C# IDatabaseUnitOfWork怎么用?C# IDatabaseUnitOfWork使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDatabaseUnitOfWork类属于命名空间,在下文中一共展示了IDatabaseUnitOfWork类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateMediaRepository
public virtual IMediaRepository CreateMediaRepository(IDatabaseUnitOfWork uow)
{
return new MediaRepository(
uow,
RuntimeCacheProvider.Current,
CreateMediaTypeRepository(uow)) { EnsureUniqueNaming = Umbraco.Core.Configuration.UmbracoSettings.EnsureUniqueNaming };
}
示例2: CreateContentTypeRepository
public virtual IContentTypeRepository CreateContentTypeRepository(IDatabaseUnitOfWork uow)
{
return new ContentTypeRepository(
uow,
InMemoryCacheProvider.Current,
new TemplateRepository(uow, NullCacheProvider.Current));
}
示例3: CreateDictionaryRepository
public virtual IDictionaryRepository CreateDictionaryRepository(IDatabaseUnitOfWork uow)
{
return new DictionaryRepository(
uow,
InMemoryCacheProvider.Current,
CreateLanguageRepository(uow));
}
示例4: CreateUserRepository
internal virtual IUserRepository CreateUserRepository(IDatabaseUnitOfWork uow)
{
return new UserRepository(
uow,
NullCacheProvider.Current,
CreateUserTypeRepository(uow));
}
示例5: CreateMediaRepository
public virtual IMediaRepository CreateMediaRepository(IDatabaseUnitOfWork uow)
{
return new MediaRepository(
uow,
RuntimeCacheProvider.Current,
CreateMediaTypeRepository(uow));
}
示例6: CreateRepository
private MemberRepository CreateRepository(IDatabaseUnitOfWork unitOfWork, out MemberTypeRepository memberTypeRepository)
{
memberTypeRepository = new MemberTypeRepository(unitOfWork, NullCacheProvider.Current);
var tagRepo = new TagsRepository(unitOfWork, NullCacheProvider.Current);
var repository = new MemberRepository(unitOfWork, NullCacheProvider.Current, memberTypeRepository, tagRepo);
return repository;
}
示例7: CreateRepository
private ContentRepository CreateRepository(IDatabaseUnitOfWork unitOfWork, out ContentTypeRepository contentTypeRepository)
{
var templateRepository = new TemplateRepository(unitOfWork, NullCacheProvider.Current);
contentTypeRepository = new ContentTypeRepository(unitOfWork, NullCacheProvider.Current, templateRepository);
var repository = new ContentRepository(unitOfWork, NullCacheProvider.Current, contentTypeRepository, templateRepository);
return repository;
}
示例8: CreateRelationRepository
public virtual IRelationRepository CreateRelationRepository(IDatabaseUnitOfWork uow)
{
return new RelationRepository(
uow,
NullCacheProvider.Current,
CreateRelationTypeRepository(uow));
}
示例9: CreateContentRepository
public virtual IContentRepository CreateContentRepository(IDatabaseUnitOfWork uow)
{
return new ContentRepository(
uow,
RuntimeCacheProvider.Current,
CreateContentTypeRepository(uow),
CreateTemplateRepository(uow));
}
示例10: CreateContentRepository
public virtual IContentRepository CreateContentRepository(IDatabaseUnitOfWork uow)
{
return new ContentRepository(
uow,
_disableAllCache ? (IRepositoryCacheProvider)NullCacheProvider.Current : RuntimeCacheProvider.Current,
CreateContentTypeRepository(uow),
CreateTemplateRepository(uow)) { EnsureUniqueNaming = Umbraco.Core.Configuration.UmbracoSettings.EnsureUniqueNaming };
}
示例11: CreateMediaRepository
public virtual IMediaRepository CreateMediaRepository(IDatabaseUnitOfWork uow)
{
return new MediaRepository(
uow,
_disableAllCache ? (IRepositoryCacheProvider)NullCacheProvider.Current : RuntimeCacheProvider.Current,
CreateMediaTypeRepository(uow),
CreateTagsRepository(uow)) { EnsureUniqueNaming = _settings.Content.EnsureUniqueNaming };
}
示例12: CreateProductVariantRepository
/// <summary>
/// Returns an instance of the <see cref="IProductVariantRepository"/>
/// </summary>
/// <param name="uow">
/// The database unit of work
/// </param>
/// <returns>
/// The <see cref="IProductVariantRepository"/>.
/// </returns>
internal virtual IProductVariantRepository CreateProductVariantRepository(IDatabaseUnitOfWork uow)
{
return new ProductVariantRepository(uow, _disableAllCache ? _nullCacheProvider : _runtimeCacheProvider);
}
示例13: CreateShipCountryRepository
/// <summary>
/// Returns an instance of the <see cref="IShipCountryRepository"/>
/// </summary>
/// <param name="uow">
/// The database unit of work
/// </param>
/// <param name="storeSettingService">
/// The store Setting Service.
/// </param>
/// <returns>
/// The <see cref="IShipCountryRepository"/>.
/// </returns>
internal virtual IShipCountryRepository CreateShipCountryRepository(IDatabaseUnitOfWork uow, IStoreSettingService storeSettingService)
{
return new ShipCountryRepository(uow, _disableAllCache ? _nullCacheProvider : _runtimeCacheProvider, storeSettingService);
}
示例14: CreateNotificationMessageRepository
/// <summary>
/// Returns and instance of the <see cref="INotificationMessageRepository"/>
/// </summary>
/// <param name="uow">
/// The database unit of work
/// </param>
/// <returns>
/// The <see cref="INotificationMessageRepository"/>.
/// </returns>
internal virtual INotificationMessageRepository CreateNotificationMessageRepository(IDatabaseUnitOfWork uow)
{
return new NotificationMessageRepository(uow, _disableAllCache ? _nullCacheProvider : _runtimeCacheProvider);
}
示例15: CreateOfferRedeemedRepository
/// <summary>
/// The create redeemed repository.
/// </summary>
/// <param name="uow">
/// The database unit of work.
/// </param>
/// <returns>
/// The <see cref="IOfferRedeemedRepository"/>.
/// </returns>
internal virtual IOfferRedeemedRepository CreateOfferRedeemedRepository(IDatabaseUnitOfWork uow)
{
return new OfferRedeemedRepository(uow, _disableAllCache ? _nullCacheProvider : _runtimeCacheProvider);
}