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 }); }
public void Setup() { Settings.ConnectionString = "Data Source=bibliotheca_test.db"; using (var context = BibliothecaContext.CreateContext()) { context.Database.Migrate(); } Manager = new BibliothecaManager(BibliothecaContext.CreateContext()); }
public BooksController(BibliothecaManager bibliothecaManager) { Manager = bibliothecaManager; }
public AccountsController(BibliothecaManager bibliothecaManager) { Manager = bibliothecaManager; }