Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvereportperformance #3899

Merged
merged 7 commits into from
Sep 12, 2024
Merged

Improvereportperformance #3899

merged 7 commits into from
Sep 12, 2024

Conversation

sudarshan0212
Copy link
Contributor

@sudarshan0212 sudarshan0212 commented Sep 9, 2024

Thank you for your contribution.
Before submitting this PR, please make sure:

  • PR description and commit message should describe the changes done in this PR
  • Verify the PR is pointing to correct branch i.e. Release or Beta branch if the code fix is for specific release , else point it to master
  • Latest Code from master or specific release branch is merged to your branch
  • No unwanted\commented\junk code is included
  • No new warning upon build solution
  • Code Summary\Comments are added to my code which explains what my code is doing
  • Existing unit test cases are passed
  • New Unit tests are added for your development
  • Sanity Tests are successfully executed for New and Existing Functionality
  • Verify that changes are compatible with all relevant browsers and platforms.
  • After creating pull request there should not be any conflicts
  • Resolve all Codacy comments
  • Builds and checks are passed before PR is sent for review
  • Resolve code review comments
  • Update the Help Library document to match any feature changes

Summary by CodeRabbit

  • New Features

    • Updated the Ginger.AccountReport.Contracts package to version 2024.4.1.6, introducing potential new features and improvements.
    • Added multiple new JavaScript files and a CSS file to enhance the web client functionality.
    • Introduced a new class for tracking execution statistics, improving reporting capabilities.
  • Documentation

    • Updated third-party licensing information to include ngx-cookie-service.
  • Bug Fixes

    • Enhanced caching control through updates to the HTML structure of the application.

Copy link
Contributor

coderabbitai bot commented Sep 9, 2024

Walkthrough

This pull request introduces updates across multiple project files, primarily focusing on incrementing the version number of the Ginger.AccountReport.Contracts package from 2024.4.1 to 2024.4.1.6. New JavaScript and CSS files have been added to enhance the web client. Additionally, modifications have been made to improve execution statistics tracking and reporting, along with updated licensing information for the ngx-cookie-service library.

Changes

Files Change Summary
Ginger/Ginger/Ginger.csproj, Ginger/GingerCoreNET/GingerCoreNET.csproj, GingerCoreNETUnitTest/GingerCoreNETUnitTest.csproj, Ginger/GingerTest/GingerTest.csproj Updated Ginger.AccountReport.Contracts package version from 2024.4.1 to 2024.4.1.6.
Ginger/GingerCoreNET/GingerCoreNET.csproj Added multiple JavaScript files and a CSS file for the web client.
Ginger/GingerCoreNET/Reports/Ginger-Web-Client/3rdpartylicenses.txt Added licensing information for the ngx-cookie-service library.
Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html Introduced new meta tags for caching control and modified stylesheet/script links.
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs Enhanced execution statistics tracking with new properties and modified helper methods.
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportExecutionLogger.cs Initialized accountReportStatistics list in relevant methods for clarity.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant WebClient
    participant ExecutionLogger
    participant Database

    User->>WebClient: Request report
    WebClient->>ExecutionLogger: Send execution data
    ExecutionLogger->>Database: Log execution statistics
    Database-->>ExecutionLogger: Acknowledge receipt
    ExecutionLogger-->>WebClient: Confirm data logged
    WebClient-->>User: Display report
Loading

🐰 In the garden where bunnies play,
New changes hop in, brightening the day!
With scripts and styles, they dance and sing,
A version update, oh what joy it brings!
So let’s celebrate with a joyful cheer,
For the Ginger project, we hold so dear! 🌼


Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 35accb5 and a2643ce.

Files selected for processing (2)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs (16 hunks)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportExecutionLogger.cs (2 hunks)
Files skipped from review as they are similar to previous changes (2)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportExecutionLogger.cs

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range, codebase verification and nitpick comments (4)
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportStatistics.cs (1)

11-16: Class implementation looks good; suggest adding XML documentation.

The AccountReportStatistics class is well-implemented with appropriate properties for its intended use. However, adding XML documentation to the properties would enhance maintainability and understanding, especially for other developers or for future reference.

Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs (3)

Line range hint 143-187: Refactor MapActivityStartData to improve readability and maintainability.

The method MapActivityStartData is quite lengthy and does several things, which can make it hard to read and maintain. Consider breaking it down into smaller, more focused methods. Additionally, the method directly manipulates properties of AccountReportActivity which could be encapsulated within the class.

Consider refactoring the method to improve clarity and encapsulation. For example, you could introduce methods like InitializeActivityExecutionId or ConfigureActivityStatistics.

Here's a potential refactor to encapsulate setting up the execution statistics:

+ private static void InitializeActivityExecutionId(Activity activity, Context context) {
+     activity.ExecutionId = Guid.NewGuid();
+     activity.ParentExecutionId = context.BusinessFlow.CurrentActivitiesGroup.ExecutionId;
+ }

+ private static void ConfigureActivityStatistics(AccountReportActivity accountReportActivity, Activity activity) {
+     accountReportActivity.ChildsExecutionStatistics = new ExecutionStatistics {
+         Action = new ActionsStatistics {
+             TotalExecutable = activity.Acts.Count(x => x.Active)
+         }
+     };
+ }

public static AccountReportActivity MapActivityStartData(Activity activity, Context context) {
    InitializeActivityExecutionId(activity, context);
    AccountReportActivity accountReportActivity = new AccountReportActivity {
        Id = activity.ExecutionId,
        EntityId = activity.Guid,
        AccountReportDbActivityGroupId = activity.ParentExecutionId,
        ExecutionId = (Guid)WorkSpace.Instance.RunsetExecutor.RunSetConfig.ExecutionID,
        Seq = context.BusinessFlow.ExecutionLogActivityCounter - 1,
        Name = activity.ActivityName,
        Description = activity.Description,
        RunDescription = GetCalculatedValue(context, activity.RunDescription),
        Environment = ((GingerExecutionEngine)context.Runner).GingerRunner.ProjEnvironment.Name,
        EnvironmentId = ((GingerExecutionEngine)context.Runner).GingerRunner.ProjEnvironment.Guid,
        StartTimeStamp = activity.StartTimeStamp,
        VariablesBeforeExec = activity.Variables.Select(a => a.Name + "_:_" + a.Value + "_:_" + a.Description + "_:_" + a.Guid + "_:_" + a.SetAsInputValue + "_:_" + a.SetAsOutputValue + "_:_" + a.Publish).ToList(),
        ActivityGroupName = activity.ActivitiesGroupID,
        RunStatus = _InProgressStatus,
        IsPublished = activity.Publish,
        ExternalID = activity.ExternalID,
        ExternalID2 = activity.ExternalID2
    };
    ConfigureActivityStatistics(accountReportActivity, activity);
    return accountReportActivity;
}

Line range hint 268-372: Optimize MapBusinessFlowStartData and MapBusinessFlowEndData for better performance and readability.

The methods MapBusinessFlowStartData and MapBusinessFlowEndData are complex and perform multiple operations which could be optimized for better performance and readability. Consider using more efficient LINQ queries or breaking down the methods into smaller, more focused sub-methods.

Here's an example of how you might refactor the calculation of executable items to use more efficient LINQ methods and improve readability:

- int ChildExecutableItemsCountAction = 0;
- foreach (Activity activity in businessFlow.Activities) {
-     ChildExecutableItemsCountAction = ChildExecutableItemsCountAction + activity.Acts.Count(x => x.Active);
- }
+ int ChildExecutableItemsCountAction = businessFlow.Activities.Sum(activity => activity.Acts.Count(x => x.Active));

accountReportBusinessFlow.ChildsExecutionStatistics = new ExecutionStatistics {
    Action = new ActionsStatistics {
        TotalExecutable = ChildExecutableItemsCountAction
    },
    Activity = new ActivitiesStatistics {
        TotalExecutable = businessFlow.Activities.Count(x => x.Active)
    }
};

This change not only makes the code more concise but also potentially improves performance by reducing the overhead of multiple method calls and iterations over collections.


Line range hint 395-433: Review and potentially refactor MapRunnerStartData and MapRunnerEndData.

The methods MapRunnerStartData and MapRunnerEndData handle a lot of logic related to setting up and concluding the execution state of runners. These methods could benefit from refactoring to improve modularity and testability.

Consider breaking down these methods into smaller parts that handle specific aspects of the runner's state. For example, separate methods for setting timestamps, handling environment details, and calculating execution rates could make the code cleaner and easier to maintain.

Here's a potential refactor for handling the environment setup:

+ private static void SetupRunnerEnvironment(AccountReportRunner accountReportRunner, GingerRunner gingerRunner) {
+     accountReportRunner.Environment = gingerRunner.ProjEnvironment.Name.ToString();
+     accountReportRunner.EnvironmentId = gingerRunner.ProjEnvironment.Guid;
+ }

public static AccountReportRunner MapRunnerStartData(GingerRunner gingerRunner, Context context) {
    gingerRunner.Executor.ExecutionId = Guid.NewGuid();
    if (WorkSpace.Instance.RunsetExecutor.RunSetConfig.ExecutionID != null) {
        gingerRunner.Executor.ParentExecutionId = (Guid)WorkSpace.Instance.RunsetExecutor.RunSetConfig.ExecutionID;
    }
    AccountReportRunner accountReportRunner = new AccountReportRunner {
        Id = gingerRunner.Executor.ExecutionId,
        EntityId = gingerRunner.Guid,
        AccountReportDbRunSetId = gingerRunner.Executor.ParentExecutionId,
        ExecutionId = (Guid)WorkSpace.Instance.RunsetExecutor.RunSetConfig.ExecutionID,
        Seq = gingerRunner.Executor.ExecutionLoggerManager.GingerData.Seq,
        Name = gingerRunner.Name,
        StartTimeStamp = gingerRunner.Executor.StartTimeStamp,
        ApplicationAgentsMappingList = gingerRunner.ApplicationAgents.Select(a => a.AgentName + "_:_" + a.AppName).ToList(),
        RunStatus = _InProgressStatus,
        IsPublished = gingerRunner.Publish
    };
    SetupRunnerEnvironment(accountReportRunner, gingerRunner);
    return accountReportRunner;
}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between fa60fc1 and b90923c.

Files selected for processing (9)
  • Ginger/Ginger/Ginger.csproj (1 hunks)
  • Ginger/GingerCoreNET/GingerCoreNET.csproj (5 hunks)
  • Ginger/GingerCoreNET/Reports/Ginger-Web-Client/3rdpartylicenses.txt (1 hunks)
  • Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html (1 hunks)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs (11 hunks)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportExecutionLogger.cs (2 hunks)
  • Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportStatistics.cs (1 hunks)
  • Ginger/GingerCoreNETUnitTest/GingerCoreNETUnitTest.csproj (2 hunks)
  • Ginger/GingerTest/GingerTest.csproj (1 hunks)
Files skipped from review due to trivial changes (4)
  • Ginger/Ginger/Ginger.csproj
  • Ginger/GingerCoreNET/Reports/Ginger-Web-Client/3rdpartylicenses.txt
  • Ginger/GingerCoreNETUnitTest/GingerCoreNETUnitTest.csproj
  • Ginger/GingerTest/GingerTest.csproj
Additional context used
GitHub Check: Codacy Static Code Analysis
Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs

[failure] 45-45: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs#L45
Change the visibility of 'accountReportStatistics' or make it 'const' or 'readonly'.


[notice] 45-45: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs#L45
Use an immutable collection or reduce the accessibility of the public static field 'accountReportStatistics'.

Additional comments not posted (8)
Ginger/GingerCoreNET/Reports/Ginger-Web-Client/index.html (3)

11-12: Cache control meta tags are appropriately added.

The addition of <meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate"> and <meta http-equiv="Pragma" content="no-cache"> is crucial for ensuring that the browser does not cache the page. This is especially important for an application like Ginger, where the most current data needs to be displayed.


17-17: Stylesheet link updated correctly.

The update to the href attribute of the stylesheet link from styles.0220388bb37cc84c.css to styles.0decbea244bacf15.css ensures that the latest styles are applied to the web client. This is important for maintaining a consistent and modern user interface.


24-24: JavaScript file link updated correctly.

The update to the src attribute of the script link from main.70d98b264f802619.js to main.438b2e8802ab272e.js ensures that the latest JavaScript is loaded, which may include new features or bug fixes for the web client.

Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportExecutionLogger.cs (2)

73-73: Initialization of statistics list is appropriate; verify data aggregation impact.

The addition of AccountReportEntitiesDataMapping.accountReportStatistics = new List<AccountReportStatistics>(); at the start of data transmission ensures that old data does not persist incorrectly. However, it's important to verify that this change does not negatively impact the aggregation or reporting of data across multiple runs.


87-89: Proper handling of statistics and response; verify impact on data handling.

The re-initialization of accountReportStatistics and the explicit naming of the response variable in SendRunsetEndDataToCentralDbTaskAsync enhance clarity and ensure that statistics are correctly managed. It's important to verify that these changes effectively manage data across multiple runs without unintended consequences.

Ginger/GingerCoreNET/GingerCoreNET.csproj (3)

1433-1435: Added new CSS file for styling updates.

The inclusion of styles.0decbea244bacf15.css indicates updates to the styling of the web client. Verify that this CSS file is properly linked within the web client's HTML files and that it enhances the user interface without causing any visual regressions.

Verification successful

CSS file is properly linked in the HTML. The CSS file styles.0decbea244bacf15.css is correctly referenced in the index.html file of the web client. It uses a technique to load asynchronously, which is efficient. However, verifying that it enhances the UI without visual regressions requires manual testing or automated visual regression tools.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the inclusion and linkage of the new CSS file in the web client's HTML files.

# Test: Search for the CSS file reference in HTML files. Expect: Proper linkage and no visual regressions.
rg --type html -A 5 $'styles.0decbea244bacf15.css'

Length of output: 731


269-269: Updated package version for Ginger.AccountReport.Contracts.

The version update from 2024.4.1 to 2024.4.1.5 is noted. Ensure that this version increment includes necessary bug fixes or enhancements as expected and that it does not introduce any breaking changes.

Verification successful

Package version update is consistent across the codebase.

The Ginger.AccountReport.Contracts package is consistently referenced with version 2024.4.1.5 across all project files. No discrepancies were found.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the package version update in other project files if applicable.

# Test: Search for the package reference in other project files. Expect: Only occurrences of the new version.
rg --type csproj -A 5 $'PackageReference Include="Ginger.AccountReport.Contracts"'

Length of output: 114


Script:

#!/bin/bash
# Description: Verify the package version update in other project files if applicable.

# Find all .csproj files and search for the package reference.
fd --extension csproj --exec rg 'PackageReference Include="Ginger.AccountReport.Contracts"' -A 5

Length of output: 1663


1175-1177: Added multiple JavaScript files for Ginger-Web-Client.

The addition of multiple JavaScript files (main.0271dbc8168ef484.js, main.139c267c5febab4e.js, etc.) suggests significant updates or enhancements to the web client's functionality. Ensure that these files are correctly referenced in the web client and that their inclusion does not impact the load times or performance negatively.

Also applies to: 1181-1183, 1187-1189, 1190-1192, 1199-1201, 1208-1210, 1214-1216, 1250-1252, 1256-1258, 1262-1264, 1271-1273, 1274-1275

@@ -41,7 +42,7 @@
//select template
static HTMLReportConfiguration _HTMLReportConfig = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems<HTMLReportConfiguration>().FirstOrDefault(x => x.IsDefault);
static string _InProgressStatus = "In Progress";

public static List<AccountReportStatistics> accountReportStatistics= new List<AccountReportStatistics>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making accountReportStatistics immutable or less accessible.

The static list accountReportStatistics is publicly accessible, which can lead to unintended modifications from various parts of the application, potentially leading to data races or inconsistent states. Consider making this list immutable or reducing its accessibility to protect its integrity.

Apply this diff to make the list readonly, which is a minimal change to ensure that the list itself cannot be reassigned:

- public static List<AccountReportStatistics> accountReportStatistics = new List<AccountReportStatistics>();
+ public static readonly List<AccountReportStatistics> accountReportStatistics = new List<AccountReportStatistics>();

Alternatively, if the design permits, consider using an immutable collection type or encapsulating the list more strictly.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public static List<AccountReportStatistics> accountReportStatistics= new List<AccountReportStatistics>();
public static readonly List<AccountReportStatistics> accountReportStatistics = new List<AccountReportStatistics>();
Tools
GitHub Check: Codacy Static Code Analysis

[failure] 45-45: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs#L45
Change the visibility of 'accountReportStatistics' or make it 'const' or 'readonly'.


[notice] 45-45: Ginger/GingerCoreNET/Run/RunListenerLib/CenteralizedExecutionLogger/AccountReportEntitiesDataMapping.cs#L45
Use an immutable collection or reduce the accessibility of the public static field 'accountReportStatistics'.

{ Key = Actvities, Value = businessFlow.Activities.Count(ac => ac.Status == eRunStatus.Failed || ac.Status == eRunStatus.Passed || ac.Status == eRunStatus.FailIgnored || ac.Status == eRunStatus.Stopped || ac.Status == eRunStatus.Completed) });
accountReportBusinessFlow.ChildsExecutionStatistics.Activity.TotalExecuted = businessFlow.Activities.Count(ac => ac.Status == eRunStatus.Failed || ac.Status == eRunStatus.Passed || ac.Status == eRunStatus.FailIgnored || ac.Status == eRunStatus.Stopped || ac.Status == eRunStatus.Completed);
accountReportBusinessFlow.ChildsExecutionStatistics.Activity.TotalPassed = businessFlow.Activities.Count(ac => ac.Status == eRunStatus.Passed);
accountReportBusinessFlow.ChildsExecutionStatistics.Activity.TotalExecutable = businessFlow.Activities.Count(x => x.Active && (x.Status == eRunStatus.Passed || x.Status == eRunStatus.Failed || x.Status == eRunStatus.FailIgnored || x.Status == eRunStatus.Blocked));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check if we really need to calculate it differently than just count what is Active

MeniKadosh1
MeniKadosh1 previously approved these changes Sep 10, 2024
{
if (businessFlow.Active)
{
var bfStat = accountReportStatistics.Where(x => x.EntityId == businessFlow.Guid).FirstOrDefault();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use FirstOrDefault directly instead of where

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

{
if(activity.Active)
{
var stat = accountReportStatistics.Where(x => x.EntityId == activity.Guid).FirstOrDefault();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use FirstOrDefault instead of where directly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants