Is it possible to set read-only mode on entities that are loaded using NHibernate's Linq provider?
For example, the following can be done with Session.QueryOver (and I believe with Criteria as well):
Session.QueryOver(Of Foo)().ReadOnly()
Is there…
I am searching around for a solution to my problem but all I get is the reasons this does happen as opposed to preventing if from happening.
I have a class, WorkflowActivityInstance which has a collection of WorkflowActivityInstanceTransitions which…
I'm working on putting together a simple POC app using Fluent NHibernate to attempt to show that it can do everything our current hand-rolled data access tool and so much more. One of the fringe cases that my boss is worried about is the ability to…
I have this situation:
public namespace ANamespace
{
public abstract class ABase:IABase
{
//properties
}
public abstract class A : ABase
{
//properties
}
public class A1 : A
{
//properties
…
My Entity has no primary key for some reasons:
public partial class VehicleLocation
{
public virtual string UserCode { get; set; }
public virtual string DateTime { get; set; }
public virtual string Device { get; set; }
public virtual…
I am trying get a record updated from database with QueryOver.
My code initially creates an entity and saves in database, then the same record is updated on database externally( from other program, manually or the same program running in other…
Some questions here in StackOverflow about NHibernate and multiple databases (dynamically connected), address me to believe that the best solution would be to keep a cache of SessionFactory (per database) and a cache to Configuration, to build…
I am looking for validation framework and while I am already using NHibernate I am thinking of using NHibernate.validator from contrib project however I also look at MS Validation Block which seem to be robust but i am not yet get into detail of…
Foo has Title.
Bar references Foo.
I have a collection with Bars.
I need a collection with Foo.Title.
If i have 10 bars in collection, i'll call db 10 times.
bars.Select(x=>x.Foo.Title)
At the moment this (using NHibernate Linq and i don't want…
This is getting quite annoying. Trying to integrate Lucene.Net search with NHibernate and i found only some information from year 07.
Is there a nice up to date tutorial for this? Where to start, what to download etc.?
Is there a way how to set…
I need a lot of DB processing done in a single transaction, including some processing using NHibernate.
To make everything work in the same transaction, I'm using NHibernate's Session to start it, and enlist the the commands for the other work in…
I have Fluent NHibernate Linq queries where I check values based on run time arrays. A basic example would be something like:
var array = [1,2,3,4,5,6];
using (var session = SessionProvider.SessionFactory.OpenSession())
{
return…
This is in a web application environment:
An initial request is able to successfully complete, however any additional requests return a "Session is Closed" response from the NHibernate framework. I'm using a HttpModule approach with the following…