Beispiel #1
0
 public ProjectCreatedIntegrationEventHandler(RecommendDbContext context, IUserService userService, IContactService contactService)//, ICapSubscribe capSubscribe)
 {
     _context        = context;
     _userService    = userService;
     _contactService = contactService;
     //_capSubscribe = capSubscribe;
 }
Beispiel #2
0
        public DatabaseFixture()
        {
            var builder = new ConfigurationBuilder().AddJsonFile("appsettings.json");

            configuration = builder.Build();
            context       = new RecommendDbContext(configuration);
            context.Recommendation.DeleteMany(Builders <Recommend> .Filter.Empty);
            context.Recommendation.InsertMany(new List <Recommend>
            {
                new Recommend {
                    RecommendId = 1, UserName = "******", title = "News1"
                },
                new Recommend {
                    RecommendId = 2, UserName = "******", title = "News2"
                }
            });
            //var options = new DbContextOptionsBuilder<RecommendDbContext>().UseInMemoryDatabase("MyRecommendDb").Options;
            //context = new RecommendDbContext((Microsoft.Extensions.Configuration.IConfiguration)options);
        }
 public RecommendRepository(RecommendDbContext dataContext)
 {
     this.dataContext = dataContext;
 }
Beispiel #4
0
 public ProjectCreatedIntegrationEventHandler(RecommendDbContext context)
 {
     _context = context;
 }
Beispiel #5
0
 public RecommendController(RecommendDbContext recommendDbContext)
 {
     _recommendDbContext = recommendDbContext;
 }
Beispiel #6
0
 public void Dispose()
 {
     context = null;
 }
Beispiel #7
0
 public RecommendController(RecommendDbContext recommendDbContext, ILogger <RecommendController> logger) : base(logger)
 {
     _recommendDbContext = recommendDbContext;
 }
 public ProjectCretedIntegrationEventHandler(RecommendDbContext dbContext, IUserService userService, IContactService contactService)
 {
     this.dbContext      = dbContext;
     this.userService    = userService;
     this.contactService = contactService;
 }
Beispiel #9
0
 public ProjectCreatedintegrationEventHandel(RecommendDbContext dbContext, IUserService userService, IContactService contactService)
 {
     _dbContext      = dbContext;
     _userService    = userService;
     _contactService = contactService;
 }
 public RecommendController(RecommendDbContext dbContext)
 {
     _dbContext = dbContext;
 }
Beispiel #11
0
 public ProjectCreatedIntergrationEventHandler(RecommendDbContext recommendDbContext, IContactService contactService, IUserService userService)
 {
     _dbContext      = recommendDbContext;
     _contactService = contactService;
     _userService    = userService;
 }