Skip to content

Commit 2a8e9bd

Browse files
committed
TD-4782 image processing fix
1 parent 8022229 commit 2a8e9bd

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

WebAPI/LearningHub.Nhs.Repository/Resources/BlockCollectionRepository.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,7 @@ public async Task DeleteBlockCollection(int userId, int blockCollectionId)
8383

8484
foreach (var id in collectionIds)
8585
{
86-
_ = Task.Run(async () =>
87-
{
88-
var lhContext = new LearningHubDbContext(this.DbContext.Options);
89-
try
90-
{
91-
await lhContext.Database.ExecuteSqlRawAsync("resources.BlockCollectionDelete @p0", new SqlParameter("@p0", SqlDbType.Int) { Value = id });
92-
}
93-
catch (Exception ex)
94-
{
95-
throw new Exception(ex.Message);
96-
}
97-
finally
98-
{
99-
await lhContext.DisposeAsync();
100-
}
101-
});
86+
await this.DbContext.Database.ExecuteSqlRawAsync("resources.BlockCollectionDelete @p0", new SqlParameter("@p0", SqlDbType.Int) { Value = id });
10287
}
10388
}
10489

0 commit comments

Comments
 (0)