How to pass Owin context to a Repo being injected into Api controller
问题 I've got a MVC WebApi owin (soft hosted) project, that uses Unity for resolving controller dependencies which look like this public class PacientaiController : ODataController { private readonly IEntityRepo<Ent.Pacientas> repo; public PacientaiController(IEntityRepo<Ent.Pacientas> repo) { this.repo = repo; } the problem I'm trying to solve - is how do I pass 'OwinContex' into a Repo. public class PacientasEntityRepo:IEntityRepo<Pacientas>,IDisposable { public PacientasEntityRepo(IOwinContext