how to execute "ExecuteSqlRawAsync" in in-memory database

Viewed 1531

I am creating unit test case using x-unit and in-memory database and i am trying to execute the below line of code

await _dbContext.Database.ExecuteSqlRawAsync(lockSql, cancellationToken);

I am getting the below error : Relational-specific methods can only be used when the context is using a relational database provider.

How do i fix this and proceed with the test case?

1 Answers
Related