Exemplo n.º 1
0
 private static void LoadNaturalnessModels <T>(HomeMadeServiceLocator sl) where T : Animal
 {
     sl.LoadDelegatedService <IFamilyCrudModel <T> >(
         () =>
         new FamilyCrudModel <T>(sl.Resolve <IConversationsContainerAccessor>(), sl.Resolve <IConversationFactory>(),
                                 sl.Resolve <IDaoFactory>()));
 }
Exemplo n.º 2
0
        private static void LoadNaturalnessDaos <T>(HomeMadeServiceLocator sl) where T : Animal
        {
            var animalDao = new AnimalDao <T>(sl.Resolve <ISessionFactory>());

            sl.LoadSingletonService <IAnimalReadOnlyDao <T> >(animalDao);
            sl.LoadSingletonService <ICrudDao <T> >(animalDao);
            sl.LoadSingletonService <IDao <T> >(animalDao);

            var familyDao = new FamilyDao <T>(sl.Resolve <ISessionFactory>());

            sl.LoadSingletonService <IFamilyDao <T> >(familyDao);
            sl.LoadSingletonService <ICrudDao <Family <T> > >(familyDao);
            sl.LoadSingletonService <IDao <Family <T> > >(familyDao);
        }