本文整理汇总了C#中IUnitOfWorkFactory类的典型用法代码示例。如果您正苦于以下问题:C# IUnitOfWorkFactory类的具体用法?C# IUnitOfWorkFactory怎么用?C# IUnitOfWorkFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IUnitOfWorkFactory类属于命名空间,在下文中一共展示了IUnitOfWorkFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FilesController
public FilesController(IFileSystemService fileSystemService, IUnitOfWorkFactory unitOfWorkFactory, ILogService logService, ICacheWrapper cacheWrapper)
{
_fileSystemService = fileSystemService;
_unitOfWorkFactory = unitOfWorkFactory;
_logService = logService;
_cacheWrapper = cacheWrapper;
}
示例2: ZinOSDesktopDropboxAccountImpl
public ZinOSDesktopDropboxAccountImpl(IUserDropboxAccountService userDropboxAccountService,
IZinOSDesktopRepository zinOSDesktopRespository, IUnitOfWorkFactory unitOfWorkFactory)
{
_userDropboxAccountService = userDropboxAccountService;
_zinOSDesktopRespository = zinOSDesktopRespository;
_unitOfWorkFactory = unitOfWorkFactory;
}
示例3: BeforeEachTest
protected virtual void BeforeEachTest()
{
CreateMappings.Create();
Mockery = new MockRepository();
UnitOfWorkFactory = Mockery.DynamicMock<IUnitOfWorkFactory>();
UnitOfWork = Mockery.DynamicMock<IUnitOfWork>();
}
示例4: LargeNumberOfIndividualWrites
public LargeNumberOfIndividualWrites()
{
Bootstrapper.Start();
this.dataCommandProvider = ObjectFactory.GetInstance<DataCommandProvider>();
this.unitOfWorkFactory = ObjectFactory.GetInstance<IUnitOfWorkFactory>();
}
开发者ID:LeadPipeSoftware,项目名称:LeadPipe.Net.NHibernateExamples,代码行数:7,代码来源:LargeNumberOfIndividualWrites.cs
示例5: UserTracksService
public UserTracksService(IUnitOfWorkFactory unitOfWorkFactory, IMusicServiceFactory musicServiceFactory)
{
_unitOfWorkFactory = unitOfWorkFactory;
_musicServiceFactory = musicServiceFactory;
}
示例6: DataService
protected DataService(IUnitOfWorkFactory unitOfWorkFactory)
{
if (unitOfWorkFactory == null)
throw new ArgumentNullException("unitOfWorkFactory");
_unitOfWorkFactory = unitOfWorkFactory;
}
示例7: LanguageService
public LanguageService(IUnitOfWorkFactory unitOfWorkFactory)
{
if (unitOfWorkFactory == null)
throw new ArgumentNullException(nameof(unitOfWorkFactory));
_unitOfWorkFactory = unitOfWorkFactory;
}
示例8: RequestService
public RequestService(IUnitOfWorkFactory unitOfWorkFactory, IDateTimeService dateTimeService, IStateManagerService stateManagerService, ITuWebService tuWebService)
{
_unitOfWorkFactory = unitOfWorkFactory;
_dateTimeService = dateTimeService;
_stateManagerService = stateManagerService;
_tuWebService = tuWebService;
}
示例9: DuplicatedBusinessRules
public DuplicatedBusinessRules()
{
Bootstrapper.Start();
this.dataCommandProvider = ObjectFactory.GetInstance<DataCommandProvider>();
this.unitOfWorkFactory = ObjectFactory.GetInstance<IUnitOfWorkFactory>();
}
示例10: DividendService
public DividendService(IStockPositionCalculator stockPositionCalculator, IUnitOfWorkFactory uowFactory)
{
Guard.AgainstNull(() => stockPositionCalculator, () => uowFactory);
_stockPositionCalculator = stockPositionCalculator;
_uowFactory = uowFactory;
}
示例11: ServicesService
public ServicesService(IUnitOfWorkFactory unitOfWorkFactory, ILogger logger, ISettingsService settingsService, IMailManagementService mailManagementService)
{
_mailManagementService = mailManagementService;
_settingsService = settingsService;
_unitOfWorkFactory = unitOfWorkFactory;
_logger = logger;
}
示例12: AnemicDomainModel
public AnemicDomainModel()
{
Bootstrapper.Start();
this.dataCommandProvider = ObjectFactory.GetInstance<DataCommandProvider>();
this.unitOfWorkFactory = ObjectFactory.GetInstance<IUnitOfWorkFactory>();
}
示例13: GuestUserService
public GuestUserService(
IGuestRoleProvider guestRoleProvider, IUnitOfWorkFactory unitOfWorkFactory, IUserCategoryService userCategoryService)
{
_guestRoleProvider = guestRoleProvider;
_unitOfWorkFactory = unitOfWorkFactory;
_userCategoryService = userCategoryService;
}
示例14: GuestRoleProvider
public GuestRoleProvider(IRoleService roleService, IUnitOfWorkFactory unitOfWorkFactory)
{
using (var uow = unitOfWorkFactory.CreateSystem())
{
var role = roleService.GetAll(uow).FirstOrDefault(x => x.SystemRole == SystemRole.Base);
if (role != null)
{
List<Role> roles = role.Roles.SelectRecursive(x => x.Roles).Select(x => x.Item).Distinct().ToList();
roles.Add(role);
_roles = new List<Role>
{
new Role
{
ChildRoles = new List<ChildRole>(),
Name = "GustRole",
SystemRole = SystemRole.Base,
Permissions = roles
.SelectMany(m => m.Permissions)
.OrderBy(m => m.FullName)
.Select(x => new Permission(){
FullName = x.FullName,
AllowRead = x.AllowRead,
AllowWrite = x.AllowWrite,
AllowCreate = x.AllowCreate,
AllowDelete = x.AllowDelete,
AllowNavigate = x.AllowNavigate,
}).ToList()
}
};
}
}
}
示例15: CompositeDatabaseKeys
public CompositeDatabaseKeys()
{
Bootstrapper.Start();
this.dataCommandProvider = ObjectFactory.GetInstance<DataCommandProvider>();
this.unitOfWorkFactory = ObjectFactory.GetInstance<IUnitOfWorkFactory>();
}