Skip to content

Instantly share code, notes, and snippets.

@mgroves
Created January 15, 2014 20:13
Show Gist options
  • Select an option

  • Save mgroves/8443643 to your computer and use it in GitHub Desktop.

Select an option

Save mgroves/8443643 to your computer and use it in GitHub Desktop.
public class BasePage : Page
{
public BasePage()
{
ObjectFactory.BuildUp(this);
}
}
public partial class _Default : BasePage // new base class
{
public IWhateverService WhateverService { private get; set; }
public ISomethingElse SomethingElseService { private get; set; }
protected void Page_Load(object sender, EventArgs e)
{
Response.Write(WhateverService.HelloWorld());
Response.Write(SomethingElseService.HelloWorld2());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment