Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to unit test dbcontext in .net core

var options = new DbContextOptionsBuilder<MovieDbContext>()
            .UseInMemoryDatabase(databaseName: "Db")
            .Options;

var context = new MovieDbContext(options);
 
PREVIOUS NEXT
Tagged: #unit #test #dbcontext #core
ADD COMMENT
Topic
Name
3+6 =