How to keep the static data while update the web?

mc 4,111 Reputation points
2021-09-17T01:51:25.773+00:00

If I create the .net core web api and publish it to the server.

I update the code and publish to the server again it will restart right?

the static variables will lost and how to keep them?

for example:

public static string ItemsValue="ssss";

how to keep it if I update the server?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,403 questions
{count} votes