views:

56

answers:

1

Hi I am totaly new to SubSonic, and have never used any other tool like it.

I am not sure if SubSonic would be the right tool, or if there are any other tool that could help. Maybe someone can clarify things for me. :)

The scenario is this:

I have a c# application that fetches data from a set of secured web services, secured through WSE 3.0. The web services expose product data, press releases related to products etc.

The data is deserialized upon retrieval, so the result is a for example a 'Product' object.

Now I want to save this data. There are dozens of different classes that needs to be saved to separate tables.

I started out creating tables and data access logic manually but then I realized maybe this was something that a tool like SubSonic or NHibernate could help with?

Could any of them use the schemas from the web services to create the data access layer and data tables?

If so, how and where would I start?

As I said, I have never used any tool like this before, so I am not sure this is something they could be useful for.

Greateful for any feedback!

A: 

Hi Daniel,

your question is not very specific, so i just can say what i'd gonna do. I am not so familiar with SubSonic so i'd prefer NHibernate. It's free and OpenSource. Of course it can help you in this situation, even though you would have to create the mapping by yourself. I assume you already have the classes you want to save, then you could simply annotate them with some NHibernate attributes and then, if not already exists hibernate would be able to create the database for you.

Another benfit would be the use of 'cascade' wich enables you to simply save a product entity and all its attached press releases (or whatever your structure is) would be saved too automatically, though i'd admit that you should use this features with care. NHibernate has a very active community and there are a lot of good example projects and tutorials. Simply use the search for some hints. To Start look on NHForge and for usefull tips and best practices Ayendes Homepage

Hibernate is very powerfull but also complex and it takes some time to get used to all features it provides, but simple CRUD operations are very easy to accomplish. So if you really just want to save/load/delete this data and thats all you wouldn't have to learn HQL or touch the Criteria API.

Hope this helps.

zoidbeck