Link Search Menu Expand Document

SkipConversionToLocalTime


This attribute sets the OracleParameter.SkipConversionToLocalTime property value via a class property. Specifies whether the value bound to this parameter should skip conversion to local time.

Attribute

Example usage:

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

    [SkipConversionToLocalTime(true)]
    public DateTime CreatedDateUtc { get; set; }
}

Fluent Mapping

To configure via FluentMapper:

FluentMapper
    .Entity<Person>()
    .PropertyValueAttributes(e => e.CreatedDateUtc, new SkipConversionToLocalTimeAttribute(true));

Retrieval

Retrieve the attribute via PropertyValueAttributeCache:

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

We strongly recommend using PropertyValueAttributeCache for maximum performance.