Table of Contents

Method Bind

Namespace
YndigoBlue.Velocity.Model
Assembly
YndigoBlue.Velocity.dll

Bind(T)

Binds a C# object to this record by automatically mapping properties to database columns using the configured binding strategy.

public Record<T> Bind(T data)

Parameters

data T

The object whose properties will be mapped to database columns.

Returns

Record<T>

This record instance for method chaining.

Remarks

The binding behavior depends on the BindingType specified in the constructor:

  • SnakeCaseUserName → user_name, EmailAddress → email_address
  • CamelCaseUserName → userName, EmailAddress → emailAddress
  • DirectMapusername → username (exact match)
  • AttributeUses [Column("column_name")] attributes on properties