Beispiel #1
0
            void ITypeHandler.SetValue(IDbDataParameter parameter, object value)
            {
#pragma warning disable 0618
                parameter.Value = SanitizeParameterValue(value);
#pragma warning restore 0618
                if (!(value is DBNull))
                {
                    StructuredHelper.ConfigureUDT(parameter, udtTypeName);
                }
            }
Beispiel #2
0
 internal static void Set(IDbDataParameter parameter, IEnumerable<T> data, string typeName)
 {
     parameter.Value = data != null && data.Any() ? data : null;
     StructuredHelper.ConfigureTVP(parameter, typeName);
 }