I would like to use dynamic properties, which look like this:
public class CustomProperty
{
public string PropType { get; set; }
public string PropValue { get; set; }
public string PropName { get; set; }
...
}
...and then save these properties to a database, like this:
PropType PropValue PropName
-------- --------- --------
String "William" "Name"
Int64 "21" "Age"
String "John" "Name"
Int64 "32" "Age"
String "Brown" "Haircolor"
...
I don't think I'm the first to have an idea like this, so I'm looking for an implementation (poen source / nuget etc.). But I have trouble finding one.
So my question is: is there an implemenation of dynamic properies which can be used (or improved if needed)?
Edit: As richardtallent pointer out, I'm looking for the EAV pattern. So, is there an implentation for it that can be used? Or do I have to write something myself. I would think it has been done many times before.