public static CodeCampService GetTestService(CCDB dbContext, Action<IKernel> bindingDelegate = null) { var kernel = new StandardKernel(); Bootstrapper.Configure(kernel); kernel.Rebind<CCDB>().ToConstant(dbContext); if (bindingDelegate != null) { bindingDelegate.Invoke(kernel); } //return kernel.Get<CodeCampService>(); return new CodeCampService(kernel.Get<PersonRepository>(), kernel.Get<SessionRepository>(), kernel.Get<MetadataRepository>(), kernel.Get<TaskRepository>(), kernel.Get<TagRepository>()); }
public static CodeCampService GetTestService(CCDB dbContext, Action <IKernel> bindingDelegate = null) { var kernel = new StandardKernel(); Bootstrapper.Configure(kernel); kernel.Rebind <CCDB>().ToConstant(dbContext); if (bindingDelegate != null) { bindingDelegate.Invoke(kernel); } //return kernel.Get<CodeCampService>(); return(new CodeCampService(kernel.Get <PersonRepository>(), kernel.Get <SessionRepository>(), kernel.Get <MetadataRepository>(), kernel.Get <TaskRepository>(), kernel.Get <TagRepository>())); }
public MetadataRepository(CCDB dbContext) : base(dbContext) { }
public PersonRepository(CCDB dbContext) : base(dbContext) { }
public TaskRepository(CCDB dbContext) : base(dbContext) { }
public RepositoryBase(CCDB dbContext) { _dbContext = dbContext; }
public SessionRepository(CCDB dbContext) : base(dbContext) { }
public TagRepository(CCDB dbContext) : base(dbContext) { }