Link controller before function inits query. Execute function executes and returns result