I’ve been meaning to post this on the forums for a while now, but I’ve just never got round to it. This isn’t actually an open-source model but I didn’t know where else to put this forum post.
Anyway, onto what ORM Dictionary actually is. If you simply create a new object role modelling file or a modelling project and place it in a folder somewhere on your hard drive each time you create an ORM, you quickly find that your ORM files become disorganised, and therefore hard to keep track of.
Instead, if you create a single C# Visual Studio console application (or any kind of Visual Studio Project), you can simply place your existing, or new object role models into the projects solution. The benefit of this is that all your ORM files will appear under the Solution Explorer in Visual Studio, under a single project. This helps to organise your ORM files and provide quick and easy access to all of your ORM files from within Visual Studio – and also enables you to load all of your files at once if you create a .sln file for your project.
A further benefit of this approach is that because all of your ORM files are under a console application, you can click on the ORM file in the Solution Explorer and generate the DDL for your file directly. This is instead of having to create a new project each time you want to generate DDL, which I find is a bit of an inconvenience.
If that didn’t make any sense, then I’ve also added a step-by-step process of how to make the ‘ORM Dictionary’ in Visual Studio 2010 below.
1. Create a new Console Application project in Visual Studio
2. Give the project a nice, memorable name
3. In the Solution Explorer right click on your projects name then go to Add > Existing Item…
4. Select an ORM file you’ve created that you want to attach to the project
5. Repeat steps 3-4 for all your ORM files
6. Now you have easy access to all your ORM files, and can create new ORM directly by right clicking on the project name in the Solution Explorer and selecting Add > New Item
Also, once finished, your projects solution should like something similar to this…
I presume some of you already organise your ORMs like this, but for those of you who don’t, I definitely think it’s worth it :)