Old blog. Blog moved to thomasgathings.com
I would delete this...but I don't see the option

November 2009 Entries

Sharing a Generic ViewModel with your master page

If you have a generic ViewModel, such as ContosoViewModel<TModel&... you can share this with the master page, to an extent, by implementing an interface to the data your shared master might need. This will allow you to avoid using things like ViewDataDictionary for something like a 'Current Customer Id'. so, here's a sample class signature for a generic view model: public class EmsViewModel<TModel> : IEmsViewModel and here is a typical view's Inherits attribute: Inherits="System.Web.Mvc.Vi...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

SQL Server Reporting Services Tip: Pass dataset results to a subreport to increase reuse and separate concerns

How do I pass dataset results to a subreport? In the past, my answer warranted too heavy lifting: duplicate filtering logic and query scope in the subreport. I came across this need as I was considering reusability in reports by leveraging subreports. This particular project, like many, has parent/child relationships. In reporting, this manifests in some typical use cases, such as: · User wishes to see a list of the parent records that meet some search criteria · User wishes to see details for that...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati