|
Hello, I want to use custom store/storage in my bot notification .net web API project. I have implemented a CustomStorage class that implements the IConversationReferenceStore interface. In the custom storage class, I add to the azure SQL database via entityframework details with data about the conversation and the user. The application should send a reminder at the right time and have a snooze. When the event for sending the reminder is triggered, I use the List method from which I map the data from the SQL database and send everyone a message individually. Is that a good approach? Thanks in advance. |
Replies: 1 comment
|
Your // write ...
entity.RawContent = JsonSerializer.Serialize(conversationReference);
// read ...
conversationReference = JsonSerializer.Deserialize<ConversationReference>(entity.RawContent);Anyway, you may have your own business requirement and your solution should work. Thanks |
Your
CustomStoragelooks good and should work to store conversation references.BTW, I noticed that you expand all properties and sub-properties (User*, Bot*, Conversation*, ...). An alternative is to store the whole object, e.g.,
Anyway, you may have your own business requirement and your solution should work.
Thanks