I have been trying to implement something that I could easily do in ROR.
Lets say the scenario is a simple blog to comments relationship, and we are doing it on the blog controller, and on the method that handles saving the blog. Now, Lets assume all the models are in place, and I can save a blog, but what I want to do is to save 1 blog record, with 1 comment in a single shot.
In ROR, my ORM would be mapped in such a way that a blog, can have a collection of comments. I can create the blog object, and add comments to it, and then save it. Automatically, on the database, the comments that have been added will inherit the ID of the blog post. I would like to do something like this in .NET. Is this possible? Or do I need to save the blog post first, and then get the id of what was currently saved, and use that to save each comment?
Please advice, and than you in advance