public Umbraco_InternShip_UnitTest()
        {
            var options = new DbContextOptionsBuilder <MvcDrawContext>()
                          .UseInMemoryDatabase <MvcDrawContext>(Guid.NewGuid().ToString())
                          .Options;

            _context = new MvcDrawContext(options);
            _context.Database.EnsureCreated();
            _controller = new DrawController(_context);
            DbInitializer.Initialize(_context);
        }
Example #2
0
 public DrawsController(MvcDrawContext context)
 {
     _context = context;
 }
Example #3
0
 //Dependency Injection with my Database Context
 public DrawController(MvcDrawContext mvcDrawContext)
 {
     _mvcDrawContext = mvcDrawContext;
 }