Accessing NHibernate Repository using ASP.NET Ajax WebMethod
- by LooDaFunk
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!