HolidayDataAccess dataAccess = new HolidayDataAccess(context) HolidayDataContext context = new HolidayDataContext(options) Ĭontext.Dates = (dates) UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) Var options = new DbContextOptionsBuilder() My end goal is to test this method: public List Handle(ClosestLocationsQuery message) I was wondering is there any way other than building a wrapper for mocking the FromSql? I know this method is static, but since they added things like AddEntityFrameworkInMemoryDatabase to entity framework core, I thought there might be a solution for this too, I use EF Core 1.0.1 in my project.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |