@@ -58,7 +58,7 @@ public LinqToDBForEFToolsDataConnection(
5858 Context = context ;
5959 _model = model ;
6060 _transformFunc = transformFunc ;
61- CopyCommandTimeout ( ) ;
61+ CopyDatabaseProperties ( ) ;
6262 if ( LinqToDBForEFTools . EnableChangeTracker )
6363 OnEntityCreated += OnEntityCreatedHandler ;
6464 }
@@ -82,7 +82,7 @@ public LinqToDBForEFToolsDataConnection(
8282 Context = context ;
8383 _model = model ;
8484 _transformFunc = transformFunc ;
85- CopyCommandTimeout ( ) ;
85+ CopyDatabaseProperties ( ) ;
8686 if ( LinqToDBForEFTools . EnableChangeTracker )
8787 OnEntityCreated += OnEntityCreatedHandler ;
8888 }
@@ -105,7 +105,7 @@ public LinqToDBForEFToolsDataConnection(
105105 Context = context ;
106106 _model = model ;
107107 _transformFunc = transformFunc ;
108- CopyCommandTimeout ( ) ;
108+ CopyDatabaseProperties ( ) ;
109109 if ( LinqToDBForEFTools . EnableChangeTracker )
110110 OnEntityCreated += OnEntityCreatedHandler ;
111111 }
@@ -172,10 +172,11 @@ private void OnEntityCreatedHandler(EntityCreatedEventArgs args)
172172 args . Entity = entry . Entity ;
173173 }
174174
175- private void CopyCommandTimeout ( )
175+ private void CopyDatabaseProperties ( )
176176 {
177- this . CommandTimeout =
178- Context ? . Database . GetCommandTimeout ( ) ?? this . CommandTimeout ;
177+ var commandTimeout = Context ? . Database . GetCommandTimeout ( ) ;
178+ if ( commandTimeout != null )
179+ CommandTimeout = commandTimeout . Value ;
179180 }
180181 }
181182}
0 commit comments