Oguz Karadenizli
Oguz Karadenizli

Reputation: 3505

Preventing serialization of properties in servicestack RedisClient

I think title is clear. ServiceStack Redis Client serializes(stores) Get Only Properties (also I added ReadOnly attribute).

Is this a bug?

Upvotes: 4

Views: 2511

Answers (1)

mythz
mythz

Reputation: 143319

That's expected behaviour: if its readable it will be serialized, and if its writable its deserializable. i.e. It will serialize get only properties but wont serialize set only public properties.

ServiceStack serializers does support the [IgnoreDataMember] attribute ignoring properties, see this example.

Upvotes: 7

Related Questions