Exemplo n.º 1
0
        public static void InitializeRepository()
        {
            _bookDB = new BooksDatabase();

            var builder = new ContainerBuilder();
            builder.RegisterType<BooksDatabase>();
            //builder.Register(new BooksDatabase());
        }
Exemplo n.º 2
0
        public BooksDatabase()
        {
            _dbInstance = this;

            dbBooks = new HashSet<BookModel>();

            dbBooks.Add(new BookModel(1,"Great Expectations","Charles Dickens","AAA"));
            dbBooks.Add(new BookModel(2, "Nicholas Nickleby", "Charles Dickens", "BBB"));
            dbBooks.Add(new BookModel(3, "David Copperfield", "Charles Dickens", "CCC"));
            dbBooks.Add(new BookModel(4, "Bleak House", "Charles Dickens", "DDD"));
            dbBooks.Add(new BookModel(5, "A Tale of Two Cities", "Charles Dickens", "EEE"));
            dbBooks.Add(new BookModel(6, "Oliver Twist", "Charles Dickens", "FFF"));
        }
Exemplo n.º 3
0
 public BookDBController(BooksDatabase db)
 {
     booksDB = db;
 }
Exemplo n.º 4
0
 public BookDBController()
     : base()
 {
     booksDB = BooksDatabase.getDatabase();
     errorlogContainer = ElmahLogger.GetErrorLogContainer();
 }