打开 关闭

Complicated linq queries placement #6257


User avatar
0
Serge 创建
  • ABP Framework version: v7.2.2
  • Database System: EF Core (PostgreSQL)
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes

Hi I want to make a join of few tables and select data from result via linq query. Where is the best place to put it: in repositories or in app services? Logically it sounds better in repositories, but EFCore module doesn't have reference to Contracts module with dtos. What is a better approach according to ABP architecture and DDD?

Thank you


2 答案
  • User Avatar
    0
    maliming 创建
    支持团队 Fullstack Developer

    hi

    The Repositories is the right place.

    You can create a domain model in Domain.Shared.

    Convert the model to DTO in appservice.

  • User Avatar
    0
    Serge 创建

    ok, thank you

Made with ❤️ on ABP v8.2.0-preview Updated on 三月 25, 2024, 15:11