I have some code doing 2 times session.Get(id) on the same ISession. I can see that the ISession creates 2 idbconnections. I guess this is because of some kind of configuration. I would like it to do the fetch on the same idbconnection. How?
nhibernate one isession same idbconnection
659 Views Asked by Stig At
1
There are 1 best solutions below
Related Questions in NHIBERNATE
- Deleting Orphans with Fluent NHibernate
- NHibernate ICompositeUserType split string columns
- NHibernate Second Level Cache for Collections is Slow
- NHibernate - using CreateMultiQuery
- NHibernate.Mapping Exception. No persister for Namespace.className
- Trouble combining Linq Expressions into a Func
- Join Tables using Fluent Nhibernate
- NHibernate - NonUniqueObjectException
- Restrictions.Disjunction().Add(Subqueries.WhereValue(1)
- Nhibernate: Exception occurred getter of id
- Mapping to Date part of Sql DateTime
- Select from Table Valued Function nhibernate
- NHibernate Filtered Child Collection Lazy Loaded even with eager fetch specified
- Parallel Transactions in distinct Session in NHibernate / SQL Server
- updating M:N data using session nhibernate .Net MVC
Related Questions in ISESSION
- ActiveRecordBase.FindAll() does not allow first level cache?
- NServiceBus 3.2 and child containers
- Stumped: Custom NHibernate Session management gives "Specified cast is not valid" exception (C#)
- Cyclic dependency with Castle Windsor IoC for NHibernate ISession
- Removing objects from NHibernate second level cache
- Nhibernate in asp,net ISession help
- Nhibernate Session and ASP.NET
- ISession per Request (Only when necessary)
- What is the correct way to use Unit of Work/Repositories within the business layer?
- NInject, NHIbernate and ISession in request scope
- NPE in 'android.media.session.ISession.getController()'
- IQueryable and ISession
- Is there a way to find saved items when using SaveOrUpdate method in nhibernate?
- NHibernate ISession: Nothing can be persisted after an Exception
- Proper session (RavenDB/NHibernate) disposal - IoC and web app
Related Questions in IDBCONNECTION
- Dapper Hangs at Execute
- Register abstract class with autofac
- How to mock static extension methods in Unit Test (c#)
- Why does commandTimeout raise SqlError in IDbConnection.Execute?
- General SQL execution using IDBconnection
- Service's Db is null in ServiceStack v4
- IDbConnection and using blocks in c#
- Issues faced during ServiceStack Ugrade from 3.9.71 to 5.9.2
- Share IDbConnection to keep transaction local
- Implement IDbConnection in .Net Core
- Injecting connection strings vs IDbConnection
- Unmanaged Resources, IDisposable and Custom Types
- nhibernate one isession same idbconnection
- Is there a generic way of passing a DbType as a parameter
- .Net Core Dependency Injection IdbConnection
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If both
Getoperations are in the same transaction, they will share the sameIDbConnection. Otherwise you end up with implicit transactions and NHibernate will open and close anIDbConnectionfor each query. In general, you should try do something like:Use of implicit transactions is discouraged: