What are the solutions for data persistance in a .NET webservice?
I have a webservice. I give an id to my webservice and this one return the correct objet.
Alternatively, you can make your service a singleton
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single,
ConcurrencyMode = ConcurrencyMode.Single)]
class Service
...
However, this approach leads to huge problems in future. Do not store anything in-memory. If you do, you embed a state into the application. This leads to tremendous amount of work needed to achieve high reliability and scalability. No state, no pain.