Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Best recommendations for querying data through a large graph #4569


User avatar
0
inzone created

Hello,

We have started developing the application services for our product and we are struggling to find the most appropiate way of querying data from a large entity graph.


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    hi, you can create a DomainService for common queries and different application services can consume from this domain service.

  • User Avatar
    0
    inzone created

    Hello,

    I understand that, but I would have performance issues doing it that way because I have to join though many entities and domain services should not use repositories according to DDD guidelines.

    Maybe I should implement custom repositories when I need to do complex queries with multiple joins?

  • User Avatar
    0
    alper created
    Support Team

    If you are worried about performance, then you need to ignore some best practices.

    Raw SQL (T-SQL) or a stored procedure always perform better than an ORM solution because you don't have to marshal the data over the wire to the ORM to perform updates.

    So my recommendation is; When you a heavy query create a custom repository and use raw SQL ...