Skip to content

Commit 4b2da47

Browse files
authored
Optimize GetProfileData2 method by removing unused database connection and redundant code (#310)
1 parent 4a94aaa commit 4b2da47

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

aspnetcore/src/api/Services/UserProfileService.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,13 +1353,8 @@ public ProfileEditorSource GetProfileEditorSource(ProfileDataFromSql p)
13531353
/*
13541354
* Get profile data - refactored
13551355
*/
1356-
13571356
public async Task<ProfileEditorDataResponse> GetProfileData2(int userprofileId, LogUserIdentification logUserIdentification, bool forElasticsearch = false)
13581357
{
1359-
var connection = _ttvContext.Database.GetDbConnection();
1360-
1361-
List<FactFieldValue> ffvs = await _ttvContext.FactFieldValues.Where(ffv => ffv.DimUserProfileId == userprofileId).ToListAsync();
1362-
13631358
ProfileEditorDataResponse profileDataResponse = new()
13641359
{
13651360
personal = new ProfileEditorDataPersonal()
@@ -1387,7 +1382,6 @@ public async Task<ProfileEditorDataResponse> GetProfileData2(int userprofileId,
13871382
cooperation = await _cooperationChoicesService.GetCooperationChoices(userprofileId, forElasticsearch),
13881383
uniqueDataSources = await _uniqueDataSourcesService.GetUniqueDataSources(userprofileId, forElasticsearch)
13891384
};
1390-
13911385
return profileDataResponse;
13921386
}
13931387

0 commit comments

Comments
 (0)