public static void InsertData(Data data) { string sql = "INSERT INTO Demo(Name,Rank,Comments)values(@Name,@Rank,@Comments)"; SQLiteDBHelper db = new SQLiteDBHelper(dbPath); SQLiteParameter[] parameters = new SQLiteParameter[]{ new SQLiteParameter("@Name",SqliteEscape(data.Name)), new SQLiteParameter("@Rank",data.Rank), new SQLiteParameter("@Comments",SqliteEscape(data.Comments)) }; db.ExecuteNonQuery(sql, parameters); }
private IEnumerable<Data.Filter> GetAllFilter(Data.QUERYEntities context, int headerID) { return context.Filters.Where(f => f.HeaderID == headerID); }