Editing in a sandbox mode

Nov 25, 2011 at 4:10 PM



Actually we inject the EntityManagerProvider (which isby default shared) in our repository. In the sandbox mode we need a  repository using a new entitymanager. I don't get how to inject in this case a new entitymanagerprovider using the Devforce Framework.

Do you have some exemple or guidance ?





Nov 25, 2011 at 5:15 PM

The HelloWorld example in the Samples folder shows how to ensure each repository instance gets it's own EntityManagerProvider. It's an older example, but it shows a way to do sandboxing.

        public OrderManagementRepository(
            [Import(RequiredCreationPolicy = CreationPolicy.NonShared)] IEntityManagerProvider<NorthwindIBEntities>
            _entityManagerProvider = entityManagerProvider;