Getting to grasp logic programming would improve your skills, even if you never use Prolog again.
Use SWI-Prolog, one of the best free implementations out there.
It is debatable if Datalog is enough or if cuts et al are worthwhile.
So the argument is that it is a similar eye-opening transition from ignorance to awareness.
I seldom use an ORM, I rather leave the work for the database engine.
My knowledge of PL/SQL, Transact-SQL, PL/pgSQL is way better than trying to make an ORM perform better.
Something like Dapper.NET or jOOQ are good enough for the remaining part of the work.
Example https://unify.ly5.ch/ (Caveat: it's an old implementation)
"Writing custom type systems for Python in Prolog"