src/WeText.Common/Querying/TableDataGateway.cs
/// <summary>
/// Gets a comma separated list of the field parameter names for INSERT operation, by using the
/// specified fields.
/// </summary>
/// <typeparam name="TTableObject">The type of the object.</typeparam>
/// <param name="fields">The <c>PropertyBag</c> object which contains the fields.</param>
/// <returns>The comma separated list of the field parameter names for INSERT operation.</returns>
/// <remarks>The auto-generated identity fields will be omitted.</remarks>
Gets a comma separated list of the field parameter names for INSERT operation, by using the
specified fields.
Gets a comma separated list of the field parameter names for INSERT operation by using the specified fields .
protected virtual string GetInsertParameterNameList<TTableObject>(WhereClauseBuilder<TTableObject> whereClauseBuilder)
            where TTableObject : class, new()
        {
            return string.Join(", ", typeof(TTableObject)
                .GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.GetProperty | BindingFlags.SetProperty)
                .Where(p => !p.IsDefined(typeof(KeyAttribute)) || !p.GetCustomAttribute<KeyAttribute>().AutoGenerated)
                .Select(p => $"{whereClauseBuilder.ParameterChar}{p.Name.ToLower()}"));
        }
protected virtual string GetInsertParameterNameList < TTableObject > ( WhereClauseBuilder < TTableObject > whereClauseBuilder ) where TTableObject : class , new ( ) { return string . Join ( " " , typeof ( TTableObject ) . GetProperties ( BindingFlags . Public | BindingFlags . Instance | BindingFlags . GetProperty | BindingFlags . SetProperty ) . Where ( p => ! p . IsDefined ( typeof ( KeyAttribute ) ) || ! p . GetCustomAttribute < KeyAttribute > ( ) . AutoGenerated ) . Select ( p => $" { whereClauseBuilder . ParameterChar } { p . Name . ToLower ( ) } " ) ) ; }
Gets a comma separated list of the field parameter names for INSERT operation, by using the
specified fields.
Gets a comma separated list of the field parameter names for INSERT operation by using the specified fields .
The comma separated list of the field parameter names for INSERT operation.
The comma separated list of the field parameter names for INSERT operation .
whereClauseBuilder
WhereClauseBuilder<TTableObject>
fields
None
typeparam
The type of the object.
The type of the object .
remarks
The auto-generated identity fields will be omitted.
The auto - generated identity fields will be omitted .