Skip to content

Instantly share code, notes, and snippets.

@Itslet
Created December 5, 2010 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Itslet/729462 to your computer and use it in GitHub Desktop.
Save Itslet/729462 to your computer and use it in GitHub Desktop.
namespace Concepts.Web.Controllers
{
public class HomeController : Controller
{
private IPersonRepository _repo;
public HomeController(IPersonRepository repository)
{
_repo = repository;
}
[TransactionFilter]
public ActionResult Index()
{
var persons = this._repo.GetPersons();
foreach (var p in persons)
{
Response.Write(p.GivenName + "<br />");
}
return View();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment