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); }
public DrawsController(MvcDrawContext context) { _context = context; }
//Dependency Injection with my Database Context public DrawController(MvcDrawContext mvcDrawContext) { _mvcDrawContext = mvcDrawContext; }