locked
Should I close off the transaction in EF ? RRS feed

  • Question

  • User185240422 posted

    Hello all , If I achieve transaction in  UnitOfWork ,Should I close off  the transaction in EF to improve performance ?

    Whether it  is not necessary to achieve transactions  in the REPOSITORY layer and SERVICE layer  too ?


    Thursday, April 16, 2015 9:38 AM

Answers

  • User1711366110 posted

    hi qiudong,
       As per your case ,the following links which may guide you to resolve this case :

    1. Click here to get sample code with explanation about Repository Pattern and Unit of Work with Entity Framework in ASP.NET MVC

    2. Click here to get sample code with explanation from similar thread Entity Framework 6 and Unit Of Work… Where, When transactions in ado.net

    --
    with regards,
    Edwin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 17, 2015 3:23 AM

All replies

  • User1711366110 posted

    hi qiudong,
       As per your case ,the following links which may guide you to resolve this case :

    1. Click here to get sample code with explanation about Repository Pattern and Unit of Work with Entity Framework in ASP.NET MVC

    2. Click here to get sample code with explanation from similar thread Entity Framework 6 and Unit Of Work… Where, When transactions in ado.net

    --
    with regards,
    Edwin

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, April 17, 2015 3:23 AM
  • User185240422 posted

    Thank you very much !

    Saturday, April 18, 2015 5:57 AM