public static Func<TEntity, TProp, TEntity> AsCopyConstructor<TEntity, TProp>(this MethodBase mb, PropertyInfo prop) { return _copyCtors.GetOrAdd((mb, typeof(Func<TEntity, TProp, TEntity>), prop), tpl => mb.CompileCopyConstructor<TEntity, TProp>(prop)) as Func<TEntity, TProp, TEntity>; }