I have some repository classes added as scoped service and I retrieve a particular repository using:
var rep = HttpContext.RequestServices.GetService(typeof(i