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);
        }
 public AuthorsController(BloggingPlatformContext context)
 {
     _context = context;
 }
Esempio n. 3
0
 public CommentManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public CategoriesController(BloggingPlatformContext context)
 {
     _context = context;
 }
 public ValuesController(BloggingPlatformContext context) : base(context)
 {
 }
Esempio n. 6
0
 public BlogPostService(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
 public PostsController(BloggingPlatformContext context)
 {
     _context = context;
 }
Esempio n. 8
0
 public TagService(BloggingPlatformContext bloggingContext, IMapper mapper)
 {
     _bloggingContext = bloggingContext;
     _mapper          = mapper;
 }
Esempio n. 9
0
 public DBController(BloggingPlatformContext context) : base()
 {
     Context = context;
 }
Esempio n. 10
0
 public AuthorManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }
Esempio n. 11
0
 public CategoryManager(BloggingPlatformContext context, IMapper mapper)
 {
     _context = context;
     _mapper  = mapper;
 }