public void Import(String path) { var nodi = this.GetNodiDaCsv(path); var conn = DbConn.GetSQLiteConnection(); conn.DropTable <Nodo>(); conn.CreateTable <Nodo>(); conn.InsertAll(nodi); conn.Close(); }
internal static List <Nodo> List(string query) { query = "%" + query + "%"; return(DbConn.GetSQLiteConnection().Query <Nodo>( " select * from Nodo " + $" where {nameof(Nodo.Codice)} like ? or " + $" {nameof(Nodo.Nome)} like ? or " + $" {nameof(Nodo.Indirizzo)} like ? or " + $" {nameof(Nodo.Costruzione)} like ?" + " limit 200" , query, query, query, query).ToList()); }
internal static List <Nodo> List() { return(DbConn.GetSQLiteConnection() .Query <Nodo>("select * from Nodo limit 200").ToList()); }