Home > Net >  Invoke the web service interface or webapi, must be to check the data from the database? How to acce
Invoke the web service interface or webapi, must be to check the data from the database? How to acce

Time:09-20

Generally cut using a web interface to get some data, to query the database, but sometimes I want to get some information in the program of real time state, don't want to put these data in the database frequently, and then call interface to the database query again, I would like to direct access to the data from

I think of two ways, but I don't know right,
1, selfhost way to establish (webapi like selfhost)
2, through the message queue

And in this case we are how to deal with, don't you all database transfer?

CodePudding user response:

Define a variable, in the application???????

CodePudding user response:

Need real-time socket should be able to meet

CodePudding user response:

My program has a parameter, for example, logging a switch (open, close the two states), the log switch application reads the configuration file is available to load, so I have a web interface, want to get to the log switch is on or off,
If, in accordance with the general way is to put the log switch state stored in the database, web interface to the database, and then returned to the caller,
Now that we have this switch variables in the program, I don't have any database, thinking of the web interface directly to the state of the switch through the web interface of the return value is passed to the caller is more convenient,

CodePudding user response:

The
reference 3 floor suncs2001 response:

Similar to the configurable parameters I have on the web. Config in
The core is the corresponding appsetting

CodePudding user response:

In the memory can't, you define a class cache, put the things inside, a small amount of data should be no problem,

CodePudding user response:

refer to fifth floor hands on the keyboard to knock very light response:
not in the memory, you define a class cache, put everything inside, and a small amount of data should be no big problem,

Is to be placed in memory, the problem is how to get in the web interface, such as using the web service on the IIS, it is directly get the program to memory,
  • Related