Skip to content

chore(migration): replace magic strings with EntityNames constants #459

@joshsmithxrm

Description

@joshsmithxrm

Summary

Replace hardcoded entity name strings with constants for better maintainability.

Problem

Throughout PPDS.Migration, magic strings are used for entity names:

  • "isdefault"
  • "account"
  • "systemuser"
  • "team"

This creates risk of typos and makes refactoring difficult.

Solution

  1. Create EntityNames static class with constants
  2. Replace magic strings with constant references
  3. Consider using existing generated entity constants where available

Example

// Before
if (entityName == "systemuser")

// After
if (entityName == EntityNames.SystemUser)

Files to Modify

  • Create: src/PPDS.Migration/Constants/EntityNames.cs
  • Modify: Multiple files in src/PPDS.Migration/

Work Stream

Stream B - Code Patterns

Acceptance Criteria

  • Constants class created
  • Magic strings replaced
  • All existing tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions