Giter VIP home page Giter VIP logo

Comments (3)

leonardoporro avatar leonardoporro commented on May 25, 2024

Hi @traiannemes,
Ok, first thing would be checking that you are using the return value of MapAsync and not the entity that you passed as a parameter (they are not the same!).
MapAsync takes a DTO that may or may not be of type TEntity, loads a TEntity from the DB using the key of the given parameter and copies the matching properties recursively.
At the end it returns the instance of TEntity that was loaded from the DB by EF using a regular query and that should include all EF configs and magics.
Secondly, I let EF to handle as much as possible, the modify state, so maybe a call to ChangeTracked.DetectChanges may be needed for some value to be calculated (?) I'm not sure about this...
I'd really appreciate if you attach a piece of code to have more context on this.

from detached-mapper.

traiannemes avatar traiannemes commented on May 25, 2024

Thank you Leonardo for the clarification, I assume next time I should pay more attention to your wiki pages :) I will close this ticket and thank you again for the explanation.

from detached-mapper.

leonardoporro avatar leonardoporro commented on May 25, 2024

Glad it worked!

from detached-mapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.