private Action <TSource, TDestination> GetCopyPk(IContextAdapter contextAdapter) { var expression = ExpressHelper.CreateCopy <TSource, TDestination>( contextAdapter.GetPk <TSource>().PropertyName, contextAdapter.GetForwardKeyProperty <TDestination>(_propertyName, typeof(TSource))); return(expression.Compile()); }
private Action <TSource, TSource> GetCopyPk(IContextAdapter contextAdapter) { var path = ExpressHelper.GetPath(_extractor); var propertyName = contextAdapter.GetBackwardKeyProperty <TSource>(path); var expression = ExpressHelper.CreateCopy <TSource, TSource>( $"{path}.{contextAdapter.GetPk<TSource>().PropertyName}", propertyName); return(expression.Compile()); }