grpc / grpc-dotnet

gRPC for .NET
Apache License 2.0
4.17k stars 767 forks source link

DbContext per service call #1754

Closed inforzip closed 2 years ago

inforzip commented 2 years ago

It is possible to create a dbcontext per service call.? I mean a dbcontext with lifetime of the service call. How could this be achieved?

JamesNK commented 2 years ago

Yes. It works the same way as MVC via dependency injeciton.

JamesNK commented 2 years ago

Thanks for contacting us. We believe that the question you've raised have been answered. If you still feel a need to continue the discussion, feel free to reopen it and add your comments.