How to connect to a lost connection when it is automatically lost with Linq to SQl

I don't want to encapsulate every call in a catch try block

is there an event that I can subscribe to when the connection or timeout is lost so that I can reconnect ..

or in any way not checking every linq request.

and if not, why?

Edit: Does Linq have Entity for this?

Edit: I am using Microsoft SQL Azure and it greatly reduces connections.

Edit: I open a new connection with every db call. so its not that i leave the connection open.

+3
source share
3 answers

( ), . , , - , - . , , .

+1

LINQ ( ), . , .

+1

? ? , , .

msdn blog

- - .

0
source

Source: https://habr.com/ru/post/1724147/


All Articles