Accessing NHibernate Repository using ASP.NET Ajax WebMethod

Posted by LooDaFunk on Stack Overflow See other posts from Stack Overflow or by LooDaFunk
Published on 2010-12-23T09:49:47Z Indexed on 2010/12/23 9:54 UTC
Read the original article Hit count: 285

Filed under:
|
|
|
|

Hi there!

on my page I have a save button that gets the values from the form and then saves it in the database using NHibernate. This works using ASP.net postback buttons. I have now added an Ajax WebMethod to make things sleek and quicker. Howver, when trying to access the data in the repository it doesn't seem to get it. I am passing in the correct values, and everything looks the same as when you are using the postback but no Joy! I should point out here that I'm a newbie with NHibernate and I'm working with someone elses code.

Here's the code:

the main problem is this line:

Solution.Entities.Hierarchy.Tag tag = tagRep.Get(tagId);

The tagID is fine, but when it does the get no exception is raised it just comes out the method and goes back to the page????

http://pastebin.com/cBTp9pnC

Anyone have any ideas?

Merry Christmas!

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET