I'm starting to program in C # and using SQLite. The problem I have is that when trying to access a table an error occurs:
The connection to the database is made, but the table is not found (it really exists)
To work with SQLite.Net you will need to create a class whose properties match the fields of your believer table. Ex:
public class creyente{
public int id { get; set;}
public string nombre { get; set; }
public string apellido { get; set; }
}
and then register the table with the CreateTable
method.
conn.CreateTable<creyente>();
This method searches for the table and uses it. In the event that it does not exist, create it.
Finally you can add attributes to your class to improve the integration:
[Table]
public class creyente{
[PrimaryKey, AutoIncrement]
public int Id { get; set;}
[MaxLength(50)]
public string nombre { get; set; }
[MaxLength(50)]
public string apellido { get; set; }
}