Questions tagged [linq-to-nhibernate]
A provider for NHibernate library for .NET Framework which allows to use LINQ queries. Available since version 3.0.
linq-to-nhibernate
623
questions
0
votes
0
answers
46
views
How to modify treeBuilder.Dot to generate LEFT JOIN instead of INNER JOIN in custom function generator for NHibernate?
Im trying to extend LINQ to NHibernate provider for my custom function. The problem that I found is that, whenever I try to access a FK from my entity, it generates a "INNER JOIN" statement, ...
0
votes
1
answer
42
views
Can I use NHibernate.Cfg.Configuration in Fluent-NHibernate when building a session factory?
I want to use the NHibernate configuration for FluentNhibernate when building a session.
This how I am constructing my factory session:
lock (_factorylock)
{
if (_factory ==...
0
votes
1
answer
127
views
NHibernate: Fetch an association which exists only in a subclass of the Query<>'d type
I've got a table-per-subclass setup using NHibernate & I'm trying to construct a LINQ query which pre-fetches certain properties that can exist in the derived classes, but I just can't work out ...
0
votes
1
answer
108
views
force to use join in nhibernate syntax instead of iteration
i am trying to figure out why nhibernate query iterates on values instead of using joins internally. due to this iteration it becomes slower, cause it will iterates all values one by one.
i.e. it ...
0
votes
1
answer
91
views
How to update Entity that have one-to-one relation?
I have entities as follows:
public class Device
{
public long Guid { get; set; }
public List<Computer> Computers { get; set; }
public string ShopName { get; set; }
}
public class ...
1
vote
1
answer
385
views
The ExceptResultOperator result operator is not current supported
I want to exclude one resultset from another and I am using Except for that but it is giving error that "The ExceptResultOperator result operator is not current supported". I can not use all ...
2
votes
1
answer
221
views
could not resolve property: CS$<>8__locals2 of: BusinessObjectMain; Nhibernate QueryOver Linq, lambda expression inside a for loop
We use Vs2019 with an older version of Nhibernate 3.2.
We recently upgraded to VS2019. This code worked correctly in VS2010.
We are getting this error with Nibernate QueryOver, lambda expressions ...
0
votes
1
answer
167
views
How do I get NHibernate to generate SQL for a computed property?
I've Googled around and come up with sample code, but it's giving me trouble. Here's what I've got, based on what I found:
In the persistent class I have
public static readonly Expression<Func<...
0
votes
2
answers
305
views
Custom Query Extension, which works with NHibernate
I am trying to write a custom Linq extension, which can also be performed within the DB.
Basically, what I want to do is collectionOfStrings.Where(x => !x.IsNullOrWhiteSpace) Unfortunately it's not ...
-1
votes
1
answer
312
views
How to join two tables queries and select matching the records in Nhibernet linq?
I am trying to develop one single query which gives me records from both the table in one result using linq-Nhibernet query.
I have two tables first one :account (accountId , accountDescription) and ...
1
vote
2
answers
527
views
How do I use LINQ with GROUP BY and multiple MAX(...) to select multiple fields? [closed]
I need to select fields from unique records within a table with multiple where clauses. I currently am using C# and LINQ fluent syntax connected with NHibernate. So I am wondering if there is a way ...
-1
votes
1
answer
59
views
Is there a best way to delete very data in database like 160k of data with Nhibernate
I have like 120k of data in a table using mssql and i have to delete all to save again, but it´s turn very slow.
I´ve an Entity called InventarioEstoque and have two childrens ...
1
vote
1
answer
346
views
Generic Filter and Sort Using NHibernate
Is there a way to implement Generic filter for NHibernate on a repository layer? As per Microsoft API Guidelines, the sort and filters are passed as string API Guidelines. what will be the approach to ...
0
votes
3
answers
1k
views
How to validate Date Start and Finish Overlap from a list of items
What I have
A list of objects with Id, DateStart and DateFinish.
[
{
Id: 1234567890,
DateStart: new DateTime(),
DateFinish: new DateTime(),
},
...
]
What I need to ...
0
votes
1
answer
157
views
HBM mapping both field and property
I have the following class:
public class Foo
{
//...
protected int? someData;
public int? SomeData
{
get {return someData;}
set {someData = value;}
}
//...
}
...