public void Save() { string columns = "description,date,category_id"; List <string> valueNames = new List <string>() { "@Description", "@Date", "@Category" }; List <Object> values = new List <Object>() { _description, _date, _categoryId }; DB.SaveToTable(_tableName, columns, valueNames, values); _id = DB.LastInsertId(_tableName); }
public void Save() { string columns = "category"; List <string> ValueNames = new List <string>() { "@Name" }; List <Object> values = new List <Object>() { _name }; DB.SaveToTable(_tableName, columns, ValueNames, values); _id = DB.LastInsertId(_tableName); }