I try to define a class for using as table in SQLite. I'm following an easy tutorial which helped me a lot. SQLite Android
The example in this tutorial is quite simple. I'm doing quite the same but my class definition is different.
[PrimaryKey]
[MaxLength(80)]
public string Database_ { get; set; }
[MaxLength(50)]
public string Companyname_ { get; set; }
[MaxLength(20)]
public string ResourceNo { get; set; }
[MaxLength(50)]
public string ResourceName { get; set; }
[MaxLength(50)]
public string Password { get; set; }
In my case the key should be (Database_,Companyname_,ResourceNo)
I can't figure out how to define multiple columns in the Primary key. Every post I found up to know is not going into this code very well. I know how to define the table in DDL. But I Need this as Class Definition.
Any help is welcome.
Aucun commentaire:
Enregistrer un commentaire