{"id":17134374,"url":"https://github.com/brianium/transaction-scope-test","last_synced_at":"2025-03-24T06:16:31.518Z","repository":{"id":13495453,"uuid":"16186075","full_name":"brianium/transaction-scope-test","owner":"brianium","description":"Testing multiple database connections with SQL Server 2008, NHibernate, and TransactionScope","archived":false,"fork":false,"pushed_at":"2014-01-24T02:36:21.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T05:56:27.733Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brianium.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-23T21:22:32.000Z","updated_at":"2018-07-31T11:34:42.000Z","dependencies_parsed_at":"2022-08-02T20:01:05.190Z","dependency_job_id":null,"html_url":"https://github.com/brianium/transaction-scope-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Ftransaction-scope-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Ftransaction-scope-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Ftransaction-scope-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brianium%2Ftransaction-scope-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brianium","download_url":"https://codeload.github.com/brianium/transaction-scope-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245217945,"owners_count":20579300,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T19:44:43.982Z","updated_at":"2025-03-24T06:16:31.486Z","avatar_url":"https://github.com/brianium.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Using NHibernate with System.Transactions.TransactionScope\n==========================================================\nThis repo demonstrates how System.Transactions.TransactionScope works with NHibernate transactions, particularly\ntransactions involving multiple databases.\n\nCreating a new transaction scope creates an \"ambient\" transaction meaning *all* ADO operations on the same thread will \nparticipate in that same ambient transaction.\n\nThis repo contains a test suite demonstrating it's use and proving it works as expected with NHibernate transactions, showing NHibernate\ntransactions will automatically enlist in the ambient transaction.\n\nRequirements\n------------\n* A SQLExpress instance or equivalent - these tests were built on a Sql Server 2008 R2 express instance and the connection strings reflect that\n* A database called `ProductDatabase`\n* A database called `OrderDatabase`\n\nSetting up databases\n--------------------\nAfter building the project run `bin\\migrateup.bat` to create tables on both databases. You can run `bin\\migratedown.bat` to remove the tables.\n\n\nRunning the tests\n-----------------\nThe tests demonstrate saving on both databases using an ambient transaction created using `new System.Transactions.TransactionScope()`\nAll tests were written in a single `Test` class in the `TransactionScopeTest.SessionTest` project in the `tests` directory.\n\nThese tests should prove that `TransactionScope` can be used to acheive transactional behavior between multiple NHibernate sessions, each connected\nto a different database.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Ftransaction-scope-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrianium%2Ftransaction-scope-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrianium%2Ftransaction-scope-test/lists"}