Support AddToEntity mechanism for lecture resource

See the commit in Library project ab8409bb39833d2925c02cb4c49b3521180b62b2
for more information how to use this.