I'm using an ORM sytem (sqlite-net) for my android application. I want to be able to create my DB mapping classes dynamically, and be able to add attributes to members, is this possible? I would need to create something like this dynamically:
class ConfigData
{
[PrimaryKey, AutoIncrement]
public int id { get; set; }
[MaxLength(20)]
public string ip { get; set; }
[MaxLength(128)]
public string port { get; set; }
}
Thanks in advance.
dynamic. Really really depends on who is going to be consuming it. The "reflection only" is the "works most places" option, but requires things likeTypeBuilder. Also, though: what is the problem definingConfigDataat compile time?