コード例 #1
0
        private void SetUpTestDBContext()
        {
            dbContextOptions = new DbContextOptionsBuilder <BloggingPlatformContext>()
                               .UseInMemoryDatabase(databaseName: "InMemoryBloggingPlatformDB")
                               .Options;

            testDBContext = new BloggingPlatformContext(dbContextOptions);

            var autoMapperConfig = new MapperConfiguration(cfg =>
            {
                cfg.AddProfile(new AutoMapperProfile());
            });

            testAutoMapper = new Mapper(autoMapperConfig);
        }
コード例 #2
0
 public AuthorsController(BloggingPlatformContext context)
 {
     _context = context;
 }
コード例 #3
0
 public CommentManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #4
0
 public CategoriesController(BloggingPlatformContext context)
 {
     _context = context;
 }
コード例 #5
0
 public ValuesController(BloggingPlatformContext context) : base(context)
 {
 }
コード例 #6
0
 public BlogPostService(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #7
0
 public PostsController(BloggingPlatformContext context)
 {
     _context = context;
 }
コード例 #8
0
 public TagService(BloggingPlatformContext bloggingContext, IMapper mapper)
 {
     _bloggingContext = bloggingContext;
     _mapper          = mapper;
 }
コード例 #9
0
 public DBController(BloggingPlatformContext context) : base()
 {
     Context = context;
 }
コード例 #10
0
 public AuthorManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
コード例 #11
0
 public CategoryManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }