RecipeTracker - Mapping File

So, my first update was a little lame. It contained just the Domain model objects. You may be wondering why it didn't also include the mapping files. I didn't explain this when I had done the upload, but I have as stated in the past used NHibernate with WPF by using a tool called VM Wrapper Express. While VM Wrapper express may provide great little wrappers around my objects for use in WPF, the tool has an issue. It doesn't like FluentNHibernate mapping files. So those actually end up in a separate project. A little inefficient, but worth the gains.

Anyway, since those 2 steps are both really one in the same, I thought that I would also provide the mapping solution today, then I'm off camping for the weekend, so no more posts until Monday or Tuesday. The link for the zip will be at the end of this post.

So, as stated before, this project is using FluentNHibernate now. Part 1 required nothing since it was just Domain objects, but now with the mappings inside the solution, you will need to download and extract Fluent NHibernate and update the references to get Part 2 running. I may go back over this later and add commenting to all of the files. I should anyway, but I really just wanted to get this done. There is a minor bug fix in my domain objects from Part 1, I had left out the reference back to the Recipe on one of the classes. That is added now.

There should be an example of most of the commonly required mappings in this solution. So hopefully this is a good starting point for anyone planning on working with FluentNHibernate.

At this point, I have no functionality. So I also have no tests. Next week, I will build a project for interacting with the Database. I had considered using something other than SQLite, but for this type of application a lightweight flat file database is really going to be the best solution and SQLite is the best I've seen at that so far. So that will become a requirement for compiling the next session. And, since there will finally be something that does something, the next step will also include a test project.

Since I've been doing everything in Visual Studio do far, I'll try and reduce the number of required installs by simply using MSTest. It will accomplish what I need it to which is to provide a test suite and allow me to test all of the code written up until this point. It's no good if things go wrong once I have a UI layered over top of it, since I won't know if the underlying code or the UI is the problem.

Other changes, I have now moved the LGPL license into the solution along with a Changlog.txt to track changes between versions.

So without further ado, here is the link:
http://docs.google.com/leaf?id=0B7jSfuxfxwTLOGMzMGJhOWQtMjliNS00YTNkLThmMjktN2I4YTI5ZTg1NTNh&hl=en

Regards,
Alex

Comments

Popular Posts