More than likely, the objects in your example inherit from IHasId<string>
. The interface defines that you do have an Id
field and its data type. This is what allows ServiceStack to find your objects by Id
. This also explains why you are seeing them stuff the field by using ToString("N")
on the Guid
.
As for Redis, think of it as any other dictionary using a key/value pair. While there are recommended conventions out there for it, Redis should not care what the actual key is. As long as your application supplies the correct key to Redis, even if that key is a Guid
, you will receive the object requested. ServiceStack will take care of the rest.