private static void FillSqlClauseBuilder <T>(
            SqlClauseBuilderIUW builder,
            T graph,
            ORMappingItemCollection mapping,
            ClauseBindingFlags bindingFlags,
            DoSqlClauseBuilder <T> builderDelegate,
            params string[] ignorProperties)
        {
            ExceptionHelper.FalseThrow <ArgumentNullException>(graph != null, "graph");

            foreach (ORMappingItem item in mapping)
            {
                if (Array.Exists <string>(ignorProperties,
                                          delegate(string target)
                {
                    return(string.Compare(target, item.PropertyName, true) == 0);
                }) == false)
                {
                    if ((item.BindingFlags & bindingFlags) != ClauseBindingFlags.None)
                    {
                        builderDelegate(builder, item, graph);
                    }
                }
            }
        }
        private static void DoWhereSqlClauseBuilder <T>(SqlClauseBuilderIUW builder, ORMappingItem item, T graph)
        {
            object data = GetValueFromObject(item, graph);

            if ((data == null || data == DBNull.Value))
            {
                builder.AppendItem(item.DataFieldName, data, SqlClauseBuilderBase.Is);
            }
            else
            {
                builder.AppendItem(item.DataFieldName, data);
            }
        }
        private static void DoInsertUpdateSqlClauseBuilder <T>(SqlClauseBuilderIUW builder, ORMappingItem item, T graph)
        {
            if (item.IsIdentity == false)
            {
                object data = GetValueFromObject(item, graph);

                if ((data == null || data == DBNull.Value || (data != null && data.Equals(TypeCreator.GetTypeDefaultValue(data.GetType())))) &&
                    string.IsNullOrEmpty(item.DefaultExpression) == false)
                {
                    builder.AppendItem(item.DataFieldName, item.DefaultExpression, SqlClauseBuilderBase.EqualTo, true);
                }
                else
                {
                    builder.AppendItem(item.DataFieldName, data);
                }
            }
        }