public void Setup()
        {
            Settings.ConnectionString = "Data Source=bibliotheca_test.db";

            using (var context = BibliothecaContext.CreateContext())
            {
                context.Database.Migrate();
            }

            Manager = new BibliothecaManager(BibliothecaContext.CreateContext());

            AccountId = Manager.AddAccount(new Account()
            {
                FirstName   = "FROM TEST",
                LastName    = "FROM TEST",
                PhoneNumber = "+37035598988"
            });


            BookId = Manager.AddBook(new Book()
            {
                Title  = "FROM TEST",
                Author = "FROM TEST",
                Status = BookStatus.Available
            });
        }
예제 #2
0
        public void Setup()
        {
            Settings.ConnectionString = "Data Source=bibliotheca_test.db";

            using (var context = BibliothecaContext.CreateContext())
            {
                context.Database.Migrate();
            }

            Manager = new BibliothecaManager(BibliothecaContext.CreateContext());
        }
예제 #3
0
 public BooksController(BibliothecaManager bibliothecaManager)
 {
     Manager = bibliothecaManager;
 }
 public AccountsController(BibliothecaManager bibliothecaManager)
 {
     Manager = bibliothecaManager;
 }