-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi,
I have two objects with a many-to-many relationship between them, as follows:
public class LeftHandSide
{
public LeftHandSide()
{
Name = String.Empty;
Rights = new HashSet<RightHandSide>();
}
public int Id { get; set; }
public string Name { get; set;…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello there,
I am trying to use NHibernate with Spring.Net und mySQL 5. However, when setting up the connection and creating the SessionFactoryObject, I get this InvalidCastException:
NHibernate seems to cast MySql.Data.MySqlClient.MySqlConnection to System.Data.Common.DbConnection which causes…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
One of practices advocated by Nhibernate experts is to do all actions in inside a transaction.
In a typical 3 tier web architecture, Nhibernate depedency is limited the data layer.
In such a case is it fine to use
using (var tr = NHibernateSession.Current.BeginTransaction()) {
at the controller…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello, and first off thanks for your time to look at this.
For a research project I'm working on, I have a somewhat complex design (which I've been given) to persist to a database via NHibernate.
Here's an example of the class hierarchy:
TransitStrategy, TransportationCompany and TransportationLocation…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello, I have a table with a time column in my SQL Server 2008 database.
The property of the object I'm trying to map to is a TimeSpan.
How can i tell FluentNHibernate to use the TimeAsTimeSpan NHibernate type, so that I don't have cast problems?
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I'm relatively new to working with C# and JSON data and am seeking guidance. I'm using C# 3.0, with .NET3.5SP1, and JSON.NET 3.5r6.
I have a defined C# class that I need to populate from a JSON structure. However, not every JSON structure for an entry that is retrieved from the web service contains…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hello.
I'm playing a little bit with the new StackOverflow API. Unfortunately, my JSON is a bit weak, so I need some help.
I'm trying to deserialize this JSON of a User:
{"user":{
"user_id": 1,
"user_type": "moderator",
"creation_date": 1217514151,
"display_name": "Jeff Atwood"…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
I want to serialize this class:
public class CarDisplay
{
public string Name { get; set; }
public string Brand { get; set; }
public string Year { get; set; }
public PictureDisplay[] Pictures { get; set; }
}
public class PictureDisplay
{
public int Id { get; set; }
public…
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
Hi there
Is anybody using JSON.NET with nHibernate? I notice that I'm getting errors when i try to load a class with child collections.
Thanks
Graham
>>> More
-
as seen on Stack Overflow
- Search for 'Stack Overflow'
The DataContractJsonSerializer is unable to handle many scenarios that Json.Net handles just fine when properly configured (specifically, cycles).
A service method can either return a specific object type (in this case a DTO), in which case the DataContractJsonSerializer will be used, or I can have…
>>> More