Commit 896cac19 authored by Jesse's avatar Jesse

Added a static class, Settings, to the SqlMapper class. The Settings class...

Added a static class, Settings, to the SqlMapper class. The Settings class will hold some "global" settings, which the SqlMapper will use.
parent 24e55162
......@@ -252,6 +252,30 @@ static MethodInfo GetBasicPropertySetter(Type declaringType, string name, Type e
/// </summary>
static partial class SqlMapper
{
/// <summary>
/// Permits specifying certain SqlMapper values globally.
/// </summary>
public static class Settings
{
static Settings()
{
SetDefaults();
}
/// <summary>
/// Resets all Settings to their default values
/// </summary>
public static void SetDefaults()
{
CommandTimeout = null;
}
/// <summary>
/// Specifies the default Command Timeout for all Queries
/// </summary>
public static int? CommandTimeout { get; set; }
}
/// <summary>
/// Implement this interface to pass an arbitrary db specific set of parameters to Dapper
/// </summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment