First of all, depending on the outcome of this discussion, this might turn into a feature request, but for now I’d like to simply ask this as a question.
I fully understand that MasterMemory is designed to provide a table structure for managing multiple data entries by ID. However, in practice, there are cases where master data consists of only a single record.
One possible approach would be to put that single record into a table and always query it by a fixed ID. That works, but it feels a bit awkward.
Since the auto-generated MemoryDatabase class is both sealed and non-partial, I cannot directly add a field for a single record. The best workaround I’ve come up with so far is to add an extension method to supplement this use case.
So my question is:
- Is there a recommended way to handle such single-record master data?
- Or is this kind of use case outside the intended scope of MasterMemory?
I’d love to hear your thoughts.
First of all, depending on the outcome of this discussion, this might turn into a feature request, but for now I’d like to simply ask this as a question.
I fully understand that MasterMemory is designed to provide a table structure for managing multiple data entries by ID. However, in practice, there are cases where master data consists of only a single record.
One possible approach would be to put that single record into a table and always query it by a fixed ID. That works, but it feels a bit awkward.
Since the auto-generated
MemoryDatabaseclass is bothsealedand non-partial, I cannot directly add a field for a single record. The best workaround I’ve come up with so far is to add an extension method to supplement this use case.So my question is:
I’d love to hear your thoughts.