Link Search Menu Expand Document

IsUnassigned


This attribute sets the DB2Parameter.IsUnassigned property value via a class property. Indicates whether the parameter is treated as an unassigned value by the data server.

Attribute

Example usage:

public class Person
{
    public int Id { get; set; }

    [IsUnassigned(true)]
    public string Name { get; set; }
}

Fluent Mapping

To configure via FluentMapper:

FluentMapper
    .Entity<Person>()
    .PropertyValueAttributes(e => e.Name, new IsUnassignedAttribute(true));

Retrieval

Retrieve the attribute via PropertyValueAttributeCache:

var attribute = PropertyValueAttributeCache
    .Get<Person>(e => e.Name)?
    .FirstOrDefault(e => e.GetType() == typeof(IsUnassignedAttribute));

We strongly recommend using PropertyValueAttributeCache for maximum performance.