Geeks With Blogs
Bob Palmer's Developer Blog .NET, SQL, and Silverlight Development

My wife finally cornered me into rebuilding her website.  This decision was partially influenced by her trying to find the FrontPage 97 CD so she cound change some content... and enough was enough.  Because nobody should be forced to have a website relaint on Frontpage (at least not in the 21st Century).

Since all of my personal projects are used as springboards to learn new stuff, and since we are in the middle of an ORM code-off at work, I figured this would be a great chance to play with both MVC and NHiberate.

I've already decided that NHibernate rocks, just from my work on small proofs of concept, and so far I'm liking MVC.  My only problem is finding books, etc. that dig right into it without demos reliant on other technologies (Entity Framework, etc.) but I'll get there,

The first bit was doing the membership provider and I decided to roll my own as an exercise in NHibernate.  For anyone working with these, let me recommend this great video:

http://www.asp.net/learn/videos/video-189.aspx

I've finished converting their SQL based code to NHibernate (I'm currently using Fluent NHibernate for this component), and going through and buildiing out all of my unit tests.  I was amazed how much code I got to jettison by moving to an ORM.

Once it's all set I'll be tossing the solution and source code out on Codeplex.

 

 

Posted on Sunday, November 15, 2009 11:12 AM | Back to top


Comments on this post: Geeking out with NHibernate and Membership Providers

# re: Geeking out with NHibernate and Membership Providers
Requesting Gravatar...
Please, publish your work :) or, send me you code. I'm needing exactly you did.
Left by Paulo on Dec 11, 2009 7:39 AM

# re: Geeking out with NHibernate and Membership Providers
Requesting Gravatar...
Hey Paulo - sorry for the delay, holidays caught up with me! Here's the source code if you still need it. Please note that this is about a 30% baked and very rough cut, but pretty much works for in the clear passwords in medium trust environments (you can see which pieces were commented or are in progress).

you can get it at: http://www.ninjapiratemonkeys.com/publicfiles/NHibernateProvider.zip

Let me know if you have any questions
Left by Bob Palmer on Dec 29, 2009 8:53 AM

# re: Geeking out with NHibernate and Membership Providers
Requesting Gravatar...
I've been trying to run your provider tests and get the following error.

Class Initialization method NHibernateProviderTest.NHibernateMembershipProviderTest.MyClassInitialize threw exception. NHibernate.MappingException: NHibernate.MappingException: Could not compile the mapping document: NHibernateProvider.NHibernateProvider.users.hbm.xml ---> System.InvalidOperationException: Could not find the dialect in the configuration.


Any ideas. This looks really useful as I've just started a new project using SharpArchitecture. This uses FluentNHibernate and I need a Membership provider.
Left by Lawrence on Mar 28, 2010 1:05 PM

# re: Geeking out with NHibernate and Membership Providers
Requesting Gravatar...
Do you have the users table created?

FYI - I'm almost done with an updated version, just polishing up some refactoring and debugging some potential issues with medium trust environments before I move it to Codeplex.
Left by Bob Palmer on Mar 28, 2010 3:23 PM

# re: Geeking out with NHibernate and Membership Providers
Requesting Gravatar...
e potential issues with medium trust environments before I move it to Codeplex.
Left by Wholesale Clothing Suppliers on Mar 20, 2011 11:52 PM

Your comment:
 (will show your gravatar)


Copyright © BobPalmer | Powered by: GeeksWithBlogs.net