added writetransaction to database facade
added connection from transaction to facade.