Frage im Vorstellungsgespräch bei Infinum

How would you refactor this code, general dotnet and database questions.