Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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