0

I am trying to save in a Redis Stack database some data by using nested keys. So, the final key should look something like that:

football:premier_league:arsenal-chelsea
football:seria_a:inter-napoli

I will use the OM Modeling, so I will have a class like this:

public class Matches
{
     public string? Sport {get;set;}
     public string? League {get;set;}
     public string? Participants {get;set;}
     public string[] Odds {get;set} = Array.Empty<string>();
}

How should I decorate this class in order to have a dynamic composited key?

Adnand
  • 562
  • 1
  • 8
  • 25

0 Answers0