This post lists the data access class that the code-behind uses to talk to the database. In this class we have our SQL strings and the Dapper methods that use those strings.
We’ve got a few static methods here that we can use to work with the SQLite database with the help of the micro-ORM Dapper. Here we get back to our SQL code and our CRUD database manipulations. You can see in the list of methods below that the first four represent Read, Create, Update and Delete (of CRUD). The last one gets the connection string. The first four are employing the C# using keyword so that the memory will automatically be released during garbage collection.
public static List LoadToDo()
public static void SaveToDo(ToDo todo)
public static void UpdateToDo(ToDo todo)
public static void DeleteToDo(int todo)
private static string LoadConnectionString(string id = “Default”)