本文整理汇总了C#中IDbContext类的典型用法代码示例。如果您正苦于以下问题:C# IDbContext类的具体用法?C# IDbContext怎么用?C# IDbContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDbContext类属于命名空间,在下文中一共展示了IDbContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EmailService
public EmailService(IDbContext context, Logger logger, ApplicationService applicationService, EmailLogService emailLogService)
{
_ctx = context;
_logger = logger;
_applicationService = applicationService;
_emailLogService = emailLogService;
}
示例2: FulltextService
/// <summary>
/// Ctor
/// </summary>
/// <param name="dataProvider">Data provider</param>
/// <param name="dbContext">Database Context</param>
/// <param name="commonSettings">Common settings</param>
public FulltextService(IDataProvider dataProvider, IDbContext dbContext,
CommonSettings commonSettings)
{
this._dataProvider = dataProvider;
this._dbContext = dbContext;
this._commonSettings = commonSettings;
}
示例3: ScoresController
public ScoresController(IDbContext context, ICompiler compiler, IRunner runner, Participant participant = null)
{
_context = context;
_compiler = compiler;
_runner = runner;
_participant = participant ?? GetCurrentParticipant();
}
示例4: UserPanelController
public UserPanelController(IDbContext dbContext, ITechnicalStaffService technicalStaffService, IParticipationService participationService, ITechnicalStaffRoleService technicalStaffRoleService)
{
_dbContext = dbContext;
_technicalStaffService = technicalStaffService;
_participationService = participationService;
_technicalStaffRoleService = technicalStaffRoleService;
}
示例5: GoogleFeedService
public GoogleFeedService(
IRepository<GoogleProductRecord> gpRepository,
IProductService productService,
IManufacturerService manufacturerService,
FroogleSettings settings,
IMeasureService measureService,
MeasureSettings measureSettings,
IDbContext dbContext,
AdminAreaSettings adminAreaSettings,
ICurrencyService currencyService,
ICommonServices services,
IComponentContext ctx)
{
_gpRepository = gpRepository;
_productService = productService;
_manufacturerService = manufacturerService;
Settings = settings;
_measureService = measureService;
_measureSettings = measureSettings;
_dbContext = dbContext;
_adminAreaSettings = adminAreaSettings;
_currencyService = currencyService;
_services = services;
_helper = new FeedPluginHelper(ctx, "SmartStore.GoogleMerchantCenter", "SmartStore.GoogleMerchantCenter", () =>
{
return Settings as PromotionFeedSettings;
});
}
示例6: MeetingDtb
public MeetingDtb(IDbContext context, UserBus userBus, MeetingBus meetingBus, AttachmentBus attachmentBus)
: base(context)
{
_userBus = userBus;
_meetingBus = meetingBus;
_attachmentBus = attachmentBus;
}
示例7: SearchCategorySelectionRepository
public SearchCategorySelectionRepository(IDbContext context)
{
if (context == null)
throw new ArgumentNullException("connectionString");
this.CurrentContext = context;
}
示例8: CustomerService
public CustomerService(IDbContext context, IRepository<Customer> customerRepository, IRepository<CustomerRole> customerRoleRepository, IRepository<ContactU> contactUsRepository)
{
this._context = context;
this._customerRepository = customerRepository;
this._customerRoleRepository=customerRoleRepository;
this._contactUsRepository = contactUsRepository;
}
示例9: DbContextScope
public DbContextScope(IDbContext ctx = null,
bool? autoDetectChanges = null,
bool? proxyCreation = null,
bool? validateOnSave = null,
bool? forceNoTracking = null,
bool? hooksEnabled = null)
{
_ctx = ctx ?? EngineContext.Current.Resolve<IDbContext>();
_autoDetectChangesEnabled = _ctx.AutoDetectChangesEnabled;
_proxyCreationEnabled = _ctx.ProxyCreationEnabled;
_validateOnSaveEnabled = _ctx.ValidateOnSaveEnabled;
_forceNoTracking = _ctx.ForceNoTracking;
_hooksEnabled = _ctx.HooksEnabled;
if (autoDetectChanges.HasValue)
_ctx.AutoDetectChangesEnabled = autoDetectChanges.Value;
if (proxyCreation.HasValue)
_ctx.ProxyCreationEnabled = proxyCreation.Value;
if (validateOnSave.HasValue)
_ctx.ValidateOnSaveEnabled = validateOnSave.Value;
if (forceNoTracking.HasValue)
_ctx.ForceNoTracking = forceNoTracking.Value;
if (hooksEnabled.HasValue)
_ctx.HooksEnabled = hooksEnabled.Value;
}
示例10: UnitOfWork
public UnitOfWork(IDbContext context)
{
if (context == null)
throw new ArgumentNullException("connectionString");
this._dbContext = context;
}
示例11: AUSaleService
public AUSaleService(
IRepository<AULotRecord> lotRepo,
IConsignorService consignorService,
IAuthenticationService authenticationService,
IRepository<AUConsignmentLotRecord> consignmentlotRepo,
IRepository<AUCountryLotRecord> countrylotRepo,
IRepository<AUStateProvinceLotRecord> stateprovincelotRepo,
IRepository<AULotLotRecord> lotlotRepo,
IRepository<AUSaleRecord> saleRepo,
IProductService productService,
IDataProvider dataProvider,
IDbContext dbContext,
ICategoryService categoryService
)
{
this._lotRepo = lotRepo;
this._consignorService = consignorService;
this._authenticationService = authenticationService;
this._consignmentlotRepo = consignmentlotRepo;
this._countrylotRepo = countrylotRepo;
this._stateprovincelotRepo = stateprovincelotRepo;
this._lotlotRepo = lotlotRepo;
this._saleRepo = saleRepo;
this._productService = productService;
this._dataProvider = dataProvider;
this._dbContext = dbContext;
this._categoryService = categoryService;
}
示例12: BaseController
public BaseController(IDbContext context) {
if (context == null) {
throw new ArgumentNullException("dbContext");
}
this.context = context;
}
示例13: PlatformDb
public PlatformDb(IDbContext context)
{
#region Preconditions
if (context == null)
throw new ArgumentNullException(nameof(context));
#endregion
this.context = context;
Apps = new Dataset<App>(context);
AppInstances = new Dataset<AppInstance>(context);
AppReleases = new Dataset<AppRelease>(context);
AppEvents = new Dataset<AppEvent>(context);
AppErrors = new Dataset<AppError>(context);
// Frontends
Frontends = new Dataset<Frontend>(context);
FrontendBranches = new Dataset<FrontendBranch>(context);
FrontendReleases = new Dataset<FrontendRelease>(context);
// Networks
Networks = new Dataset<Network>(context);
NetworkInterfaces = new Dataset<NetworkInterfaceInfo>(context);
Hosts = new Dataset<Host>(context);
Volumes = new Dataset<VolumeInfo>(context);
Images = new Dataset<Image>(context);
}
示例14: AccountController
public AccountController(IDbContext dbContext, IRepresentativeUserService representativeUserService, IFormsAuthenticationService formsAuthentication, IUserService userService)
{
_dbContext = dbContext;
_representativeUserService = representativeUserService;
_formsAuthentication = formsAuthentication;
_userService = userService;
}
示例15: RunController
public RunController(IDbContext context, ICompiler compiler, IRunner runner, Participant participant = null)
{
_context = context;
_compiler = compiler;
_runner = runner;
_participant = participant == null ? GetCurrentParticipant() : participant;
}