Skip to content

Issue #18: Invalid Names #18

@shadyashraf174

Description

@shadyashraf174

Issue #18: Invalid Names

Type: Naming Violations
Files: Throughout codebase

Problematic Examples:

  1. Generic DbContext name:
public class MyDbContext // Doesn't reveal domain purpose
  1. Non-descriptive variables:
var x = context.BlogPosts... // 'x' in queries
  1. Inconsistent naming:
public string Text { get; set; } // In BlogComment
public string Title { get; set; } // In BlogPost - should be 'Content' for consistency

Solution:

public class BlogDbContext : DbContext // Domain-specific
public var posts = context.BlogPosts... // Descriptive
public string Content { get; set; } // Standardized

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