Using Singleton then create a new instance of HttpClient #188
-
Hello, Sorry for the possible dumb question. I do not understand why in startup.cs we create a Singleton which contains the connection data to the FileMaker server and then in the examples, we must declare :
if we want to use FindAsyc() for exemple. Can you enlighten me? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The samples are intended to be a fully usable sample that is separate from using the asp.net dependency injection framework. If you have a singleton defined in startup.cs, you should be able to just request an |
Beta Was this translation helpful? Give feedback.
The samples are intended to be a fully usable sample that is separate from using the asp.net dependency injection framework.
If you have a singleton defined in startup.cs, you should be able to just request an
IFileMakerApiClient
from the di container and use it directly.