Skip to content

Update formatting code for double-nested lambdas #26349

@ajcvickers

Description

@ajcvickers

Currently the code doesn't handle indents correctly. For example, scaffolded temporal table configuration:

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<Blog>(entity =>
        {
            entity.ToTable(tb => tb.IsTemporal(ttb =>
    {
        ttb.UseHistoryTable("BlogsHistory", "dbo");
        ttb
            .HasPeriodStart("PeriodStart")
            .HasColumnName("PeriodStart");
        ttb
            .HasPeriodEnd("PeriodEnd")
            .HasColumnName("PeriodEnd");
    }
));
        });

        modelBuilder.Entity<Post>(entity =>
        {
            entity.ToTable(tb => tb.IsTemporal(ttb =>
    {
        ttb.UseHistoryTable("PostsHistory", "dbo");
        ttb
            .HasPeriodStart("PeriodStart")
            .HasColumnName("PeriodStart");
        ttb
            .HasPeriodEnd("PeriodEnd")
            .HasColumnName("PeriodEnd");
    }
));

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions