public void Can_get_attribute_empty_value_from_null_accessor() { IEntityGetter <xts_entity> accessor = null; Assert.Null(accessor.Get(e => e.xts_attribute)); Assert.Null(accessor.Get(e => e.xts_withcolumnattribute)); Assert.Null(accessor.Get(e => e.xts_money)); Assert.Null(accessor.Get(e => e.xts_optionsetvalue)); }
public static TV GetAliasedValue <TV>(this IEntityGetter <Entity> accessor, string attributeName) => (TV)accessor.Get <AliasedValue>(attributeName)?.Value;
public static bool Equal <T, TV>(this IEntityGetter <T> accessor, string attribute, TV comparisonValue) where T : Entity => Equal(accessor.Get <TV>(attribute), comparisonValue);
public static TV Get <T, TV>(this IEntityGetter <T> accessor, Expression <Func <T, TV> > attribute) where T : Entity => accessor != null?accessor.Get <TV>(Name(attribute)) : default(TV);