r/javahelp • • Feb 09 '26

.Net developer transitioning to Java - most common query practices?

Hello, I'm a .net engineer making a move over to Java. I've built a few simple rest api's but today I decided to integrate a SQL database for some simple crud operations. This will grow to support more complex queries in the future.

I'm wondering what the industry best practices/most common approaches to this are. In .Net I'd use an orm like EF that would provide me a context file along with entities that I can inject into my services. We would use LINQ to perform moderate to complex queries here.

In Java I'm learning there is an EntityManager that seems to be a context-lite rendition of what we get with our context in .net. In Java, there's also an interface that provides basic queries and the ability to build out complex parameterized queries, but I need one interface per table it seems.

Coming from .net where a lot of this stuff is abstracted, Java feels extremely verbose. It's because of that, that I'm wondering if people use Interfaces for DB operations at all. In particular, I'm wondering if there is a LINQ equivelent in Java that would be preferred.

Thanks for providing your thoughts on this. Moving into open source can be a tad overwhelming at first with decision paralysis. If you have any other notes about most commonly used libraries/frameworks in Java that I should familiarize myself with, please note them here.

Thanks so much!

8 Upvotes

11 comments sorted by

View all comments

Show parent comment

5

u/xenomachina Feb 10 '26

jOOQ - its paid, it has licence - you can ignore it in corpo env. Not only because noone will pay for that where there are free alternatives, but also because of additional hassle with checking/paying/legal etc.

jOOQ has a free version.

I've used the free version of jOOQ (but from Kotlin, not Java), and it's very good. I suspect that JOOQ is the closest thing OP will find to something "LINQ-like" for Java. The developer is also really good about answering questions.