So what do you suggest to do to not use the code above? Use entity?