Skip to content

Issue #22: Inconsistent Property Order #22

@shadyashraf174

Description

@shadyashraf174

Issue #22: Inconsistent Property Order

Type: Code Style
Files: BlogComment.cs

Problematic Layout:

public class BlogComment
{
    public int Id { get; set; }
    public string Text { get; set; }
    public BlogPost BlogPost { get; set; } // Navigation property mixed
    public DateTime CreatedDate { get; set; } // Back to simple property
}

Solution:

public class BlogComment
{
    // Primitive properties first
    public int Id { get; }
    public string Text { get; }
    public DateTime CreatedDate { get; }
    
    // Navigation properties last
    public BlogPost BlogPost { get; }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions