Esempio n. 1
0
        /// <summary>
        ///     Configures the graph dif.
        /// </summary>
        /// <param name="profileToUpdate">The profile to update.</param>
        private void ConfigureGraphDiff(Profile profileToUpdate)
        {
            // TODO: Add more entities to this

            _db.UpdateGraph(profileToUpdate,
                            map => map.OwnedEntity(
                                p => p.ProfileProfessional,
                                with =>
                                with.AssociatedEntity(p => p.Agency)
                                .AssociatedEntity(p => p.Base)
                                .AssociatedEntity(p => p.CCG)
                                .AssociatedEntity(p => p.IndemnityProvider)
                                .AssociatedEntity(p => p.JobType)
                                .OwnedCollection(p => p.ProfilePaymentCategories, x => x.AssociatedEntity(p => p.PaymentCategory))
                                .OwnedCollection(p => p.ProfileShiftTypes, x => x.AssociatedEntity(p => p.ShiftType))
                                .AssociatedEntity(p => p.RegisteredSurgery)
                                .AssociatedEntity(p => p.RegistrarLevel)
                                )
                            .OwnedCollection(p => p.ProfileDocuments)
                            .OwnedCollection(p => p.SpecialNotes)
                            .AssociatedEntity(p => p.SecurityRole)
                            .OwnedEntity(p => p.ProfileFinance, x => x.AssociatedEntity(p => p.Bank))
                            );
        }