public void Initializer() { scope = new TransactionScope(); dao = new BookSqlDAO(connectionString); using (SqlConnection conn = new SqlConnection(connectionString)) { conn.Open(); SqlCommand cmd = new SqlCommand("INSERT book (title, authors, genre, shelf_number, add_date)" + "VALUES ('Star Wars', 'John Fulton', 'Test Genre', 2, '2018-08-14');", conn); cmd.ExecuteNonQuery(); } }
public UserController(IUserSqlDAO userDAO, IBookSqlDAO bookDAO) : base(userDAO) { this.userDAO = userDAO; this.bookDAO = bookDAO; }
public HomeController(IBookSqlDAO bookDAO, IForumPostSqlDAO forumDAO, IUserSqlDAO userDAO) : base(userDAO) { this.forumDAO = forumDAO; this.bookDAO = bookDAO; this.userDAO = userDAO; }