Esempio n. 1
0
        public void ShouldBeAbleToCreateRepositoryAndAddGeneratedDtoTypesToIt()
        {
            ObjectRepository repo = new ObjectRepository(MethodBase.GetCurrentMethod().Name);

            Type[] pocoTypes = Dto.GetTypesFromDaos(typeof(MainObject).Assembly);
            repo.AddTypes(pocoTypes);
            OutLine("All poco types", ConsoleColor.Blue);
            pocoTypes.Each(t =>
            {
                OutLine(t.Name, ConsoleColor.Cyan);
            });
            OutLine("All storeable types", ConsoleColor.Blue);
            repo.StorableTypes.Each(t =>
            {
                OutLine(t.Name, ConsoleColor.Cyan);
            });
        }