I've just released another sample for the Database Explorer API, this time using the built in features of Visual Studio 2008 (should work with VS 2005 with a download of the SDK). Visual Studio 2008 comes with a built in code generator known as T4. While the built in editing experience leaves a bit to be desired the free T4 editor by Clarius Consulting goes a long way to making it workable. If you download the editor, it indicates that the time bomb expires in Jan 1, 2008; this however isn't the case as they're still working on the next release.
This sample creates a fairly decent (not perfect by any means) set of entities which you can then easily drop on to a class designer and get a good feel for how your domain model looks. It has support for all but the recursive relationship type, which could be added as the API does support this. This sample is provided to show how much you can do with both T4 and the API in only a small amout of code. I've included a screen shot from the Adventure Works sample, which as you can see supports many relationship types. The sample download includes the results run against the AdventureWorks sample database.
To download the new sample visit the projects CodePlex page.
Remember to provide as much feed back on the samples and API as you can. Enjoy!

Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I'm in the process of getting up to speed with DSL tools, and while there's a whole lot of info out there, at the end of a long day I'd prefer to watch a video on a new subject rather than pour over the written docs, but trying to locate all the video's can be difficult, and even more if you want to view them in the right order. Well this is my effort to make things a little easier. Unless otherwise stated these videos's relate to Visual Studio 2008 edition of DSL tools, as I discover more DSL video's I'll add them to the list. If you know of a good one I've missed, leave a comment and I'll get it added. More...
Currently rated 1.0 by 1 people
- Currently 1/5 Stars.
- 1
- 2
- 3
- 4
- 5
For anyone that's read my blog entries you've seen me make mention to a framework that I've been working on. Well today marks the release of the first beta of part of that framework. The Database Explorer API, is a database schema API that is designed to make accessing database schema information easy and intuitive. More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
While I don't normally get involved with deploying web applications (we normally have 'people' for that) however I did have to deploy the application you're using now. Which brings me to the blog post I recently found which discusses the top 10 best practices for ASP.NET which I've linked to on my toolbox page. The main one that concerned was of concern to me was forgetting to switch off debug mode.
1: <system.web>
2: <compilation debug="false" />
3: </system.web>
This setting appears to have a large impact on production web sites so I'd check out the detail in the this post to get all the details. Also you might want to check the config files of the production apps you work on or blog if you host your own; lets just say we may need to update a few of ours!
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
I went along to the .NET developers association in Redmond on Monday where Ken Levy demonstrated the extensibility tools of VS.NET 2008 (which also relates to VS 2005 to some extent). It seems that MS have decided to offer the VS 2008 shell license free! If you're anyone who's looking at providing third party tools (related or not to Visual Studio) and need a good IDE host, you've just saved yourself a bucket load of time. Also, it runs in two modes, integrated (merges with your instance of VS 2008) or isolated where it acts as its own (customisable too I was led to believe) IDE without the need for VS 2008. More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
This article was originally published in the April 2003 issue of Visual Studio Magazine. Their online version has been archived, so it has been reproduced here. The articles code requires updating for .NET 2.0 which will be the subject of a future post.
ASP.NET has brought about a huge change in how we as developers think about designing a web site. We all know that ASP.NET now gives us the opportunity to create reusable custom controls which we can drag and drop onto our pages, which can even remember the information entered between postbacks, using the viewstate mechanism built into ASP.NET. This has proven to be a huge advantage in designing our pages, by allowing us to bring our more traditional programming model to the Web for the first time. ASP.NET also allows us to add these same controls dynamically at runtime. More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
In many application be they web or otherwise it can be important to secure parts of the configuration files incase the file is compromised by a hacker or you simply don't want anyone to know what the true values are. It turns out that this is fairly easy to do using the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) (obvious right?). To illustrate the point I'll show you a typical config file and what's required to encrypt parts of it. More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
Here is Chapters 4 & 5 of the book I never got around to publishing. The chapters cover MSMQ in a fair amount of depth, but remember whole books have been written on this subject. So don’t expect it to be some type of bible. Having said that, if you don’t need to be a guru then these Chapters will give you more than enough knowledge to start working with MSMQ and also explain why it’s a good fit for a particular situation. I’ve included the table of contents so you’ll have an idea of what’s being covered. If you have any feedback feel free to leave a comment! More...
Currently rated 5.0 by 1 people
- Currently 5/5 Stars.
- 1
- 2
- 3
- 4
- 5
September 27, 2007 19:08 by
garrymc
When I work with collections I’ll often want to retrieve information from the collection by its key. So my options are usually to make use the following generic collection (who uses any other type of collection now? Unless you’re stuck on .NET 1.1):
1: System.Collections.Generic.Dictionary<TKey,TValue>
This is great collection except if you want to ever serialize it! Then you’ll have some problems. So the issue becomes do I want a collection which is searchable via an index and is serializable or one that is keyed but can’t be serialized. The problem however, is that in a lot of cases you actually want to be able to use both methods, that is search by ordinal number or index and be able to search by a key, which maybe a business key. To solve this issue many have resorted to inheriting from IList<T> then adding another item overload which iterates through the collection until you find a match. This works, but is probably not too efficient on large collections. Also it’s a pain to have to write this code each time.
With the introduction of .NET 2.0 Microsoft released a collection object which doesn’t get a lot of press. The reason why it’s not discussed very often is because it’s only provided in an abstract form. That is you have to create a concrete implementation before you can use it. As it turns out this is not that hard to do. For example the following C# code is an example of a simple implementation for an Order class: More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5
September 17, 2007 19:10 by
garrymc
Here is the next Chapter of the book which is the second part of the WMI Chapter. This Chapter explains how to manipulate class instances and asynchronous processing. Also covered is how you can add WMI support to your own applications which is surprisingly easy but can be quite useful, including exposing application data and how to raise events from your application.
Next week I’ll release the Chapters on Microsoft Message Queues. Feel free to leave any feedback about what you thought about the Chapter. I’ll also be blogging about some things I’ve been working on more recently over the next week or so too.
To give you an idea of the chapters contents here's the table of contents. More...
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5