public PropertyInfo GetEntityPrimaryKey(IAuditableContext context)
        {
            var property = _pkSelector == null
                                 ? context.GetPrimaryKeyProperty(EntityType)
                                 : _pkSelector.ToPropertyInfo();

            return(property);
        }
示例#2
0
        internal static LambdaExpression GetEntityPkProperty <TEntity>(this IAuditableContext context)
        {
            var pk = context.GetPrimaryKeyProperty(typeof(TEntity));

            return(GetPropertySelector <TEntity>(context, pk.Name));
        }