Skip to content

Commit 7fd36fe

Browse files
Profile Type Update: don't use transaction for add
1 parent 693ed81 commit 7fd36fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

api/CESMII.ProfileDesigner.Api/Controllers/ProfileTypeDefinitionController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,6 @@ private async Task<IActionResult> UpdateInternal(ProfileTypeDefinitionModel mode
575575

576576
int? id = 0;
577577
{
578-
_dal.StartTransaction();
579578
if (isAdd)
580579
{
581580
id = await _dal.AddAsync(model, base.DalUserToken);
@@ -596,9 +595,10 @@ private async Task<IActionResult> UpdateInternal(ProfileTypeDefinitionModel mode
596595
}
597596
else
598597
{
598+
_dal.StartTransaction();
599599
id = await _dal.UpdateAsync(model, base.DalUserToken);
600+
await _dal.CommitTransactionAsync();
600601
}
601-
await _dal.CommitTransactionAsync();
602602
}
603603
if (id < 0)
604604
{

0 commit comments

Comments
 (0)