1

I am trying to figure out how I would create a composite KEY with the geode native client APIs. Does someone have a simple example of how I would do this in .NET? For example, say my data class is:

MyDataObject

string field1;
string field2;
string field3;

I want a composite key on field1 and field2. What would this look like in C# .NET?

bad_coder
  • 11,289
  • 20
  • 44
  • 72

1 Answers1

0

I would make a string of field1.field2 as the key. Although a key can also be the whole object. But I use strings for keys and build composite keys out of strings as said.

So your region type would be:

IRegion<String, MyDataObject>
rupweb
  • 3,052
  • 1
  • 30
  • 57
  • 1
    Thanks. I was able to find an example in the .net client examples. The "key" object has to implement IDataSerializable, ICacheableKey. – Michael Thoresen Feb 02 '22 at 23:40