Refactoring restu a entit