-
-
Notifications
You must be signed in to change notification settings - Fork 133
Open
Milestone
Description
Related to #1130. This is a particular nuisance when using Entity Framework where all of the collections are nested within a DbContext instance.
The current behavior violates the general "one dot per line" rule. Additionally, this is the primary reason that I have not introduced CSharpier into my team's project.
Input:
public List<ThingDto> GetThingsCreatedAtOrAfter(DateTimeOffset timestamp)
{
return _db.Things.Where(x => x.CreatedAt >= timestamp).Select(x => new ThingDto
{
Id = x.Id,
Name = x.Name,
Description = x.Description,
Quantity = x.Quantity,
}).ToList();
}Output:
public List<ThingDto> GetThingsCreatedAtOrAfter(DateTimeOffset timestamp)
{
return _db
.Things.Where(x => x.CreatedAt >= timestamp)
.Select(x => new ThingDto
{
Id = x.Id,
Name = x.Name,
Description = x.Description,
Quantity = x.Quantity,
})
.ToList();
}Expected behavior:
public List<ThingDto> GetThingsCreatedAtOrAfter(DateTimeOffset timestamp)
{
return _db.Things
.Where(x => x.CreatedAt >= timestamp)
.Select(x => new ThingDto
{
Id = x.Id,
Name = x.Name,
Description = x.Description,
Quantity = x.Quantity,
})
.ToList();
}dvdvorle, fossbrandon, nandor23, KeltorHD, LeninForever and 6 more
Metadata
Metadata
Assignees
Labels
No labels