Data/CafeLib.Data.Sources/SaveResult.cs
/// <summary>
/// Check Sql Id type for requiring quotation.
/// </summary>
/// <typeparam name="T">identifier type</typeparam>
/// <returns>return quoted id for certain types</returns>
Check Sql Id type for requiring quotation.
Check Sql Id type for requiring quotation .
private static T DefaultSqlId()
        {
            switch (typeof(T).Name)
            {
                case "String":
                    return (T)(object)"";
                case "Guid":
                    return (T)(object)Guid.Empty;
                case "Int32":
                case "Int64":
                    return (T)(object)0;
                default:
                    throw new NotSupportedException(typeof(T).Name);
            }
        }
private static T DefaultSqlId ( ) { switch ( typeof ( T ) . Name ) { case " " : return ( T ) ( object ) " " ; case " " : return ( T ) ( object ) Guid . Empty ; case " " : case " " : return ( T ) ( object ) 0 ; default : throw new NotSupportedException ( typeof ( T ) . Name ) ; } }
Check Sql Id type for requiring quotation.
Check Sql Id type for requiring quotation .
return quoted id for certain types
return quoted id for certain types
typeparam
None