views:

903

answers:

2

Is there anyone using Subsonic with asp.net mvc framework? If so, can you tell us something about your experience. Are there tips and tricks that can be shared?

+9  A: 

If you're planning on doing database first design, and you don't need any mapping (i.e. you're in control of your db naming) then SubSonic is a decent option.

It's straight-forward, doesn't hide a lot from you. On the same token, for advanced scenarios I have to side-step it a lot and execute raw sql (or a sproc).

If you're looking for a better object abstraction over the database, something that more closely matches your problem domain, then I'd look at NHibernate or Castle ActiveRecord. This gives you a lot more flexibility in how you want your object model to look, and you have a powerful query API at your disposal.

None of this really has to do with ASP.NET MVC, other than you just use your objects in your web project. I'd suggest putting the entities inside of a separate class library project anyway.

Ben Scheirman
+5  A: 

I totally agree with Ben SubSonic is an ORM and works well with the MVC concept but doesn't have anything that ties it with MVC.

For small projects or for projects that you already have a Database and don't really care to much about the domain then SubSonic is great and will get you up and running very fast.

But if your project is a bit bigger or more specificity your DB is an after thought then you should go with a tool like NHibernate.

FYI Summer of NHibernate is a great Screencast Series on getting started with NHibernate

Yitzchok