Open belav opened 2 years ago
Some examples
builder.Entity<IdentityUserToken<string>>(b =>
{
b.HasKey(
l =>
new
{
l.UserId,
l.LoginProvider,
l.Name
}
);
b.ToTable("AspNetUserTokens");
});
table.PrimaryKey(
"PK_AspNetUserTokens",
x =>
new
{
x.UserId,
x.LoginProvider,
x.Name
}
);
this may be more because of breaking with the new { }
stuff that came from #755
builder.Entity<EntityWithThreeProperties>(e =>
{
e.HasIndex(
t =>
new
{
t.X,
t.Y,
t.Z
},
"IX_unspecified"
);
e.HasIndex(
t =>
new
{
t.X,
t.Y,
t.Z
},
"IX_empty"
)
.IsDescending();
e.HasIndex(
t =>
new
{
t.X,
t.Y,
t.Z
},
"IX_all_ascending"
)
.IsDescending(false, false, false);
e.HasIndex(
t =>
new
{
t.X,
t.Y,
t.Z
},
"IX_all_descending"
)
.IsDescending(true, true, true);
e.HasIndex(
t =>
new
{
t.X,
t.Y,
t.Z
},
"IX_mixed"
)
.IsDescending(false, true, false);
});
class ClassName
{
void MethodName()
{
var searchRequest = new SearchDescriptor<ElasticsearchProduct>().WithAggregations(
o =>
o.WithFilter(
key,
f =>
f.WithFilter(fd => filter)
.WithAggregations(
ad =>
ad.WithTerm(
key,
cd =>
cd.WithField(facetField).WithSize(MaximumCategoryFacets)
)
)
)
);
}
}
This keeps getting postponed... :(
There are improvements that could be made to printing arguments, namely with lambdas as parameters. #669 stuck to just improving some simple cases (single arguments or parenthesized lambdas with no arguments). Prettier has more complicated logic that we should look into.
A simple lambda with too long of an argument name + a block doesn't break when it should. Simple lambdas with no block. Parenthesized lambdas with no block. Parenthesized lambdas with arguments.