protected object GetQuotedValueOrDbNull(FieldDefinition fieldDef, object objWithProperties) { var value = fieldDef.GetValue(objWithProperties); if (value == null) { return(DBNull.Value); } var unquotedVal = OrmLiteConfig.DialectProvider.GetQuotedValue(value, fieldDef.FieldType) .TrimStart('\'').TrimEnd('\''); ; if (string.IsNullOrEmpty(unquotedVal)) { return(DBNull.Value); } return(unquotedVal); }
protected object GetValueOrDbNull(FieldDefinition fieldDef, object objWithProperties) { return(fieldDef.GetValue(objWithProperties) ?? DBNull.Value); }