Created
February 23, 2012 18:59
-
-
Save cbcwebdev/1894377 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseController : Controller | |
{ | |
// auto-populate this based on request | |
public Directory Directory { get; set; } | |
} | |
public class AnotherController : BaseController | |
{ | |
public ActionResult Index() | |
{ | |
// no need to care about data access, just use exposed properties | |
var viewModel = new SomeViewModel { | |
Directory = Directory | |
}; | |
return View(viewModel); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment