Use Output Parameters
What this page covers#
This page shows how to use output parameters with MooParams.
Example#
using System.Data; var parameters = new MooParams() .AddInt("@UserId", 42) .AddInt("@RowsAffected", null, ParameterDirection.Output) .AddNVarChar("@StatusMessage", null, 200Key idea#
You add the parameter before execution, then read its value back from the same
MooParamsinstance afterwards.Notes#
- use typed getters where possible
GetNullable...methods returnnullforDBNull- getters throw if the value cannot be read as the requested type