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
dataTThe 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