@@ -48,7 +48,12 @@ public IQueryable<Person> People
4848 get
4949 {
5050 var datasource = _dataStoreManager . GetDataStoreInstance ( Key ) ;
51- return datasource ? . People . AsQueryable ( ) ;
51+ if ( datasource != null )
52+ {
53+ return datasource . People . AsQueryable ( ) ;
54+ }
55+
56+ return null ;
5257 }
5358 }
5459
@@ -57,7 +62,12 @@ public IQueryable<Person> NewComePeople
5762 get
5863 {
5964 var datasource = _dataStoreManager . GetDataStoreInstance ( Key ) ;
60- return datasource ? . People . AsQueryable ( ) ;
65+ if ( datasource != null )
66+ {
67+ return datasource . People . AsQueryable ( ) ;
68+ }
69+
70+ return null ;
6171 }
6272 }
6373
@@ -66,7 +76,12 @@ public Person Me
6676 get
6777 {
6878 var datasource = _dataStoreManager . GetDataStoreInstance ( Key ) ;
69- return datasource ? . Me ;
79+ if ( datasource != null )
80+ {
81+ return datasource . Me ;
82+ }
83+
84+ return null ;
7085 }
7186 }
7287
@@ -75,7 +90,12 @@ public IQueryable<Airline> Airlines
7590 get
7691 {
7792 var datasource = _dataStoreManager . GetDataStoreInstance ( Key ) ;
78- return datasource ? . Airlines . AsQueryable ( ) ;
93+ if ( datasource != null )
94+ {
95+ return datasource . Airlines . AsQueryable ( ) ;
96+ }
97+
98+ return null ;
7999 }
80100 }
81101
@@ -84,7 +104,12 @@ public IQueryable<Airport> Airports
84104 get
85105 {
86106 var datasource = _dataStoreManager . GetDataStoreInstance ( Key ) ;
87- return datasource ? . Airports . AsQueryable ( ) ;
107+ if ( datasource != null )
108+ {
109+ return datasource . Airports . AsQueryable ( ) ;
110+ }
111+
112+ return null ;
88113 }
89114 }
90115
@@ -349,7 +374,7 @@ public Task<SubmitResult> ExecuteSubmitAsync(SubmitContext context, Cancellation
349374 /// </summary>
350375 private class CustomerizedChangeSetInitializer : IChangeSetInitializer
351376 {
352- public async Task InitializeAsync ( SubmitContext context , CancellationToken cancellationToken )
377+ public Task InitializeAsync ( SubmitContext context , CancellationToken cancellationToken )
353378 {
354379 var key = LibraryUtils . GetSessionId ( ) ;
355380 var dataSource = _dataStoreManager . GetDataStoreInstance ( key ) ;
@@ -417,6 +442,8 @@ public async Task InitializeAsync(SubmitContext context, CancellationToken cance
417442 }
418443 }
419444 }
445+
446+ return Task . WhenAll ( ) ;
420447 }
421448
422449 private static void SetValues ( object instance , Type type , IReadOnlyDictionary < string , object > values )
0 commit comments