Many of the demos I do with Entity Framework do not involve the UI. In order to run them however, I need to start with some type of exe, so I just build a console app whose main method calls the different methods to demonstrate functionality.
Someone suggested that rather than use the console app, I use unit tests to fire off the methods. It's a fun exercise for me, but I'm worried that the extra layer (the unit tests) might throw off anyone in the audience who is not familiar with unit testing. THey will be trying to understand how the tests are constructed rather than focusing on the EF code I am trying to demonstrate.
With a console app, there is a simple line to call a method - e.g. SearchableArguments whereas a unit test has to instantiate the calling class, then instantiate a result, call the result and validate the result. And the act of running/debugging the tests also is visually distracting since it has a separate interface and it's little green (you bet they'll be green!) lights.
What do you think? Should I use the lame but cleaner, less distracting way of running my demos (console app) or do the "right way" which has the potential of distracting a subset of the attendees from the core lessons?
Part of the equation is how many attendees will be unfamiliar with unit testing vs. how many u.t. pros will be annoyed by the console app?
Personally, I lean towards the cleaner way - console app. But I thought I would try to get a consensus. If you do reply, do indicate if you will actually be in these sessions ("EF Tips and Tricks" and "Surprise! It's the Entity Framework Gotchas")
Thanks!




