Starts in:
1 DAY
21 HRS
46 MIN
40 SEC
Starts in:
1 D
21 H
46 M
40 S
Open Closed

Update DTO and execution Pattern #5056


User avatar
0
viswajwalith created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

If you're creating a bug/problem report, please include followings:

  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): yes / no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

We have couple of DTO objects with lot of properties (some are with around 89-90), when it comes to updating 1 or 2 fields we are forced to pass entire DTO object to update those 2 fileds even tough we have no changes to other fields.

As per the EF (in general) the update statement should handle the scenario and it should prepare the update statement with update of 2 fields only not for all...

Can you please provide how the things will work in the ABP way for both SQL and Mongo. in simple words we would like to know a process to update a object by passing required properties to have a limited data while transferring and having better query execution time.


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    As per the EF (in general) the update statement should handle the scenario and it should prepare the update statement with update of 2 fields only not for all...

    You are using ef core 6.x, have you tried the ef core 7?

  • User Avatar
    0
    viswajwalith created

    hi

    As per the EF (in general) the update statement should handle the scenario and it should prepare the update statement with update of 2 fields only not for all...

    You are using ef core 6.x, have you tried the ef core 7?

    We didn't tried the ef core 7 and we are middle of ABP 7 upgrade. do you mean after ef 7 the concern will handle automatically for both SQL & Mongo?

    But still we had to pass the Entire Update DTO even we update few properties right? any work around for the same or do we need to write the custom method to do so.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you share some code or a project to reproduce?

    liming.ma@volosoft.com

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I think this feature available on ef core 7.0

  • User Avatar
    0
    viswajwalith created

    I think this feature available on ef core 7.0

    Yes we also found this but not sure how it be have with MongoDB, for code sample give me 2 days time I will provide

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    We don't familiar with MongoDB, You can create a sample project with ef core.

  • User Avatar
    0
    viswajwalith created

    hi

    We don't familiar with MongoDB, You can create a sample project with ef core.

    We will try to provide a sample in two days to continue our discussion.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Thanks

  • User Avatar
    0
    viswajwalith created

    Thanks

    We are still preparing the sample solutions, will share by tomorrow max

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    no problem

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06