Ejemplo n.º 1
0
        public static IGuestBookRepository CreateRepository()
        {
            var settings = new ApplicationSettings();

            switch (settings.GuestBookRepositoryType)
            {
                case "GuestBookSqLiteRepository":
                    return new GuestBookSqLiteRepository(settings);
                case "GuestBookXmlRepository":
                    return new GuestBookXmlRepository(settings);
                default:
                    return new GuestBookXmlRepository(settings);
            }
        }
Ejemplo n.º 2
0
 public OrderRepository(ApplicationSettings applicationSettings)
 {
     _applicationSettings = applicationSettings;
 }
 public GuestBookXmlRepository(ApplicationSettings settings)
 {
     _settings = settings;
 }
Ejemplo n.º 4
0
 public ProductRepository(ApplicationSettings applicationSettings)
 {
     _applicationSettings = applicationSettings;
 }