public void Update(GanresStaroseletsEV book) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "UPDATE Ganres SET GanresName = @ganresName"; db.Execute(sqlQuery, book); } }
public void Create(GanresStaroseletsEV book) { using (IDbConnection db = new SqlConnection(connectionString)) { var sqlQuery = "INSERT INTO Ganres (GanresName) VALUES(@ganresName)"; db.Execute(sqlQuery, book); } }