MHPStandardLib 1.7.0
dotnet add package MHPStandardLib --version 1.7.0
NuGet\Install-Package MHPStandardLib -Version 1.7.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="MHPStandardLib" Version="1.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MHPStandardLib --version 1.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MHPStandardLib, 1.7.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.
// Install MHPStandardLib as a Cake Addin
#addin nuget:?package=MHPStandardLib&version=1.7.0
// Install MHPStandardLib as a Cake Tool
#tool nuget:?package=MHPStandardLib&version=1.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
MHPStandardLib
This one uses Microsoft.Data.SqlClient
YOu can use this Dataaccess class for basic Sql functions e.g.
Basic Exec
public async Task<ReturnClass> DeleteQuizAsync(int itemid) {
ReturnClass outcome = new ReturnClass(true);
outcome = await db.ExecSqlAsync("delete from quiz where id=" + itemid.ToString());
return outcome;
}
Basic Update
public async Task<ReturnClass> UpdateQuizAsync(quiz obj) {
ReturnClass outcome = new ReturnClass(true);
SP_Parameters p = new SP_Parameters();
string Sql = "";
Sql = @"update quiz set Localeid=@Localeid, Originalid=@Originalid, Culture=@Culture, Type=@Type, Json=@Json, Imageids=@Imageids where id=@Id";
p.Add("@Localeid", SqlDbType.Int, 4, ParameterDirection.Input, obj.Localeid);
p.Add("@Originalid", SqlDbType.Int, 4, ParameterDirection.Input, obj.Originalid);
p.Add("@Culture", SqlDbType.NVarChar, 10, ParameterDirection.Input, obj.Culture);
p.Add("@Type", SqlDbType.Int, 4, ParameterDirection.Input, obj.Type);
p.Add("@Json", SqlDbType.NVarChar, 30000, ParameterDirection.Input, obj.Json);
p.Add("@Imageids", SqlDbType.NVarChar, 500, ParameterDirection.Input, obj.Imageids);
p.Add("@Id", SqlDbType.Int, 4, ParameterDirection.Input, obj.Id);
outcome = await db.ExecSqlParamsAsync(Sql, p);
return outcome;
}
Basic Get
public quiz GetQuiz(int itemid) {
quiz obj = new quiz();
DTReturnClass ret = null;
string Sql = "";
Sql = @"select Id, Localeid, Originalid, Culture, Type, Json, Imageids from quiz where Id=" + itemid.ToString();
ret = db.GetDataTable(Sql);
if (ret.Success) {
foreach (DataRow oRow in ret.Datatable.Rows) {
obj.Id = Convert.ToInt32(oRow[0]);
obj.Localeid = Convert.ToInt32(oRow[1]);
obj.Originalid = Convert.ToInt32(oRow[2]);
obj.Culture = oRow[3].ToString();
obj.Type = Convert.ToInt32(oRow[4]);
obj.Json = oRow[5].ToString();
obj.Imageids = oRow[6].ToString();
}
}
return obj;
}
The ReturnClass class has int, long and double properties which can be used with the Scalar functions
Task<ReturnClass> GetDoubleScalarParamsAsync(string strQuery, SP_Parameters p, CancellationToken cancellationToken);
ReturnClass GetIntScalarParams(string query, SP_Parameters p);
Task<ReturnClass> GetLongScalarProcAsync(string strQuery, CancellationToken cancellationToken);
Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.Data.SqlClient (>= 5.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Uses Microsoft.Data.SqlClient (5.1.1)