mongodb - c# repository pattern to support normalized mongo db -


I am starting to learn mangodibi and I am trying to create a repository pattern in C # that is the normalized data model Can support as it has been presented in this.

I have a few questions about how I should do this.

  1. Do I want to save the object property first before saving the original object?
  2. While questioning, should I first query the object properties and then connect them to the original object through the code?

    So far, my current repository saves the pattern code and queries the embedded model and I do not like it. Hopefully you can tell me some ideas how to create a repository pattern supporting a normalized model. Thank you :)

    This shows a good way to apply the repository pattern to C #. The objective is to hide how the object is formed and to limit the data access codes for a set of tables or tables for any location.

    Usually, a repository will fully populate your objects so that any collections of other objects are properly populated. If you have a separate store for parents unit, then you need to save that unit in the database before saving your children. Unless your repository can save parents and child objects at the same time.

    The repository plate can definitely support generalization, though it usually depends on how you install your object hierarchy.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -