Injecting database into Assignment object