Questions tagged as 'nhibernate'

0
answers

NHibernate INNER JOIN FETCH is not populating properties

I have the following query in HQL: select photoRating from PhotoRating as photoRating inner join fetch photoRating.FormularioRespostaDoUsuario as form inner join fetch form.Trecho as section And whenever I run it using the...
asked by 11.04.2016 / 16:57
0
answers

Bag nHibernate with key null

Hello, Does anyone know if it's possible to use nHibernate's Bag with Key Null? In a table some records have several related records, one for many, but not always, sometimes a regret will not have any. I made the mapping by a bag but th...
asked by 02.10.2015 / 17:27
0
answers

How to use cache in NHibernate with C # [closed]

How can I use cache in NHibernate with C #? What is the best way to implement it? And what are the considerations that I should take?     
asked by 21.10.2014 / 16:13
1
answer

doubts when doing nhibernate mapping

I have the following scenario: public class ExemploDTO { public virtual int Id { get; set; } public virtual List<PessoaDTO> Cliente { get; set; } public virtual ServicoDTO Servico { get; set; } } How would map this class u...
asked by 18.02.2015 / 19:33
1
answer

Get information using a dropdownlist as select

I need to make a basic fuel system, where when I select the type of fuel, it brings me the last registered value of that product and automatically selects and automatically inserts the value of the fuel in the TextBox. The supply table is onl...
asked by 10.10.2017 / 21:27
1
answer

If you do not have the value to compare, save without making the comparison

I'm trying to make my application save if it has no value to compare, but it's always going through the comparison, I've already tried to put an if but it still has a problem, this is the class that compares my view to my database. Controller...
asked by 05.09.2017 / 17:12
2
answers

Save the date and time?

I wanted to know how to save the date and time in the database, and the time wanted to be automatically pulled from the machine or server. So I was able to log the date, but the time is cleared. MyViewModel:publicintId{get;set;}publicdecimal...
asked by 05.09.2017 / 22:35
2
answers

Serialize NHibernate object to JSON

How can I serialize an NHibernate object to JSON. When I try to serialize the error saying that it is not possible to serialize an object in context.     
asked by 16.06.2016 / 01:41
1
answer

NHibernate create database?

I am a Java developer and I work with Hibernate. Now I need to create a desktop application and I decided to use C # for this. I've been researching ORM frameworks for C # and found the Entity Framework and NHibernate. As my experience is greate...
asked by 26.02.2016 / 19:14
1
answer

Fluid mapping composite nhibernate key with firebird bank

I am having difficulty in composing primary key mapping using fluent nhibernate. I have the following class: public class NotaItem { public NotaItem(){} public virtual int Id { get; set; } //chave primaria public virtual Int16 Nu...
asked by 02.02.2016 / 18:15