public async Task GetTodos2() { var optionsBuilder = new DbContextOptionsBuilder <TodosDbContext>() .UseSqlServer(CreateInMemoryDatabase()); TodosDbContext TodosContext = new TodosDbContext(optionsBuilder.Options); TodosService todosService = new TodosService(TodosContext); var obj = await todosService.GetTodo(1); Assert.IsNull(obj); }
public async Task <Todo> Get(string id) { return(await todos.GetTodo(id)); }