MySqlOptimizer 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package MySqlOptimizer --version 1.2.0
                    
NuGet\Install-Package MySqlOptimizer -Version 1.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MySqlOptimizer" Version="1.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="MySqlOptimizer" Version="1.2.0" />
                    
Directory.Packages.props
<PackageReference Include="MySqlOptimizer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add MySqlOptimizer --version 1.2.0
                    
#r "nuget: MySqlOptimizer, 1.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package MySqlOptimizer@1.2.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=MySqlOptimizer&version=1.2.0
                    
Install as a Cake Addin
#tool nuget:?package=MySqlOptimizer&version=1.2.0
                    
Install as a Cake Tool

Explanation of the Changes Method Signature: The method now takes a storedProcedureName as a string and a Dictionary<string, object> for parameters. This allows you to pass named parameters to the stored procedure.

Command Type: The command type is set to CommandType.StoredProcedure, indicating that the command being executed is a stored procedure.

Adding Parameters: The method iterates over the provided parameters and adds each one to the MySqlCommand object using cmd.Parameters.AddWithValue(). This method automatically handles the parameter types based on the values you provide.

Usage Example Here’s how you might call this method:

string connectionString = "your_connection_string_here"; string storedProcedureName = "your_stored_procedure_name_here";

var parameters = new Dictionary<string, object> { { "@param1", value1 }, { "@param2", value2 }, // Add more parameters as needed };

DataTable result = ExecuteSelect(connectionString, storedProcedureName, parameters); Important Notes Ensure that the parameter names in the dictionary match the names expected by the stored procedure (including the @ symbol). If you have specific data types for parameters, you might want to use MySqlParameter to define them explicitly instead of using AddWithValue(), which infers the type. Always validate and sanitize your inputs to avoid SQL injection and other security issues, especially when dealing with user input.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MySqlOptimizer:

Package Downloads
MySqlCore

Single-class MySQL helper for .NET with ADO.NET, EF Core, async streaming, pagination, logging, bulk insert/upsert, and transactions.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.1.0 175 10/24/2025
1.4.0 456 7/21/2025
1.3.0 166 11/20/2024
1.2.0 151 11/20/2024
1.1.0 155 11/14/2024
1.0.0 154 11/14/2024