Questions tagged as 'nhibernate'

1
answer

Search Results NHibernate C #

I'm doing a query in NHibernate, but I'm not able to get the desired result, I want to bring all my items from the file table that have no relation to another table called Layouts, I tried to use a where to get it back, but when I called the met...
asked by 08.11.2017 / 12:56
1
answer

Put the value of a hql in a var [closed]

I need to have my two tables work together, where Abastecimento takes the Product Name ( NomeProdutoId ), from the Compra table, I was able to get it to get the Product Name, but wanted me to If you do not know the name of th...
asked by 23.10.2017 / 19:35
1
answer

Error when adding SUM

I'm trying to implement SUM within these lines of code to sum the two columns Litro and TotalGasto Code: var teste = consulta.Where(i => i.DtAbastecido >= dataInicio && i.Dt...
asked by 01.02.2018 / 20:35
3
answers

Get C # class property

I need to get all the properties of a class that is of type class. Ex: public class Pessoa{ public virtual int? Id { get; set; } public virtual MinhaClasse1 prop1{ get; set; } public virtual MinhaClasse2 prop2{ get; set; } }...
asked by 29.07.2016 / 16:33
1
answer

Attempting to update with NHibernate?

I'm trying to make an update with NHibernate but it always returns me an error saying that there are two open sessions: illegally attempted to associate a proxy with two open session How to solve this? GenericDAO public class Ge...
asked by 10.03.2016 / 23:17
1
answer

nHibernate with more than one database

Hello, I would like to know if it is possible to use nHibernate with more than one database, some tables will be in one bank and others in another. How would I do this? And in entity mappings, how would I report that mapping is from a tabl...
asked by 15.09.2015 / 15:23
1
answer

Query with query using LINQ and NHibernate

I need help with a query that you should look for:    PK_PARENT, PAPER_NAME, {FILE_NAME, FILE_NAME2, ..., FILE_NAME *} For the search I've tried to search some ways like: var listaPai = (from parent in session.Query<Parent>() sele...
asked by 24.09.2015 / 21:18
2
answers

How to create summation with "sum" with multiple columns queryover

I need to create a query with C # queryOver (Nhibernate), to add more than one column. Example in pure sql: SELECT SUM(coluna1 + coluna2 + coluna3 + coluna4) FROM tabela First I did it this way: Tabela tabela = null; Session.QueryOver<...
asked by 05.07.2016 / 21:39
1
answer

NHibernate QuerySyntaxException

I'm trying to return the amount of objects a query will return. If I run the following command: query.ToList().Count The value is returned successfully, however if you execute the following command: query.Count() The following error...
asked by 26.09.2018 / 16:40
1
answer

NHibernate consuming lots of memory

I have an application that connects to the database via NHibernate , so some operations are performed as Save, Update e Delete . But when performing these procedures it is incredible how memory accumulation is done by not automatical...
asked by 19.02.2018 / 18:51