public static void CreateLessons(Lesson lesson) { //BDManager.SqlQuery($"INSERT Lessons(Name, Description) VALUES ('{lesson.name}', '{lesson.description}');"); var connection = BDManager.CreateMySqlConnection(); System.Data.SqlClient.SqlCommand command = connection.CreateCommand(); command.CommandText = "INSERT Lessons(Name, Description) VALUES (@name, @description);"; command.Parameters.AddWithValue("@name", lesson.name); command.Parameters.AddWithValue("@description", lesson.description); connection.Open(); command.ExecuteNonQuery(); }