Skip to content

Commit 1aaa711

Browse files
Merge pull request #99 from cesmii/stage
Profile Type Update: don't use transaction for add
2 parents 673923c + 7fd36fe commit 1aaa711

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
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)