示例#1
0
            public override bool ShouldSkip(object?obj, EntityDescriptor entityDescriptor, ColumnDescriptor columnDescriptor)
            {
                if (obj != null)
                {
                    var value = columnDescriptor.GetProviderValue(obj);
                    if (value is int i)
                    {
                        return(i % 2 == 0);
                    }
                }

                return(false);
            }
示例#2
0
        public static SqlValue GetSqlValueFromObject(this MappingSchema mappingSchema, ColumnDescriptor columnDescriptor, object obj)
        {
            var providerValue = columnDescriptor.GetProviderValue(obj);

            return(new SqlValue(columnDescriptor.GetDbDataType(true), providerValue));
        }