Posted By

vinaygunnam on 07/02/13


Tagged

UnitOfWork


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

danfinrud55


UnitOfWork - Controller


 / Published in: C#
 

URL: hello

UnitOfWork - Controller

  1. public class CustomerController : Controller
  2. {
  3. private UnitOfWork uow = new UnitOfWork();
  4.  
  5. public ActionResult Get(int id) {
  6. var customer = uow.CustomerRepository.Get(id);
  7. return Json(customer, JSON.DenyGetRequest);
  8. }
  9.  
  10. public void Dispose() {
  11. uow.Dispose();
  12. }
  13. }

Report this snippet  

You need to login to post a comment.