When using fluent methods with different levels of semantic meaning, it can be difficult to maintain good readability with CSharpier currently, since it doesn't know the semantic difference between two fluent method calls.
Here's a tiny example of using a FluentMappingBuilder from Linq2Db to setup
But the issue is how we can teach CSharpier about the significance of calling Entity<>() vs for example calling Property() or HasColumnName().
I was thinking that maybe a comment-style approach similar to how // csharpier-ignore currently works might be a good solution.
E.g. something like this to apply to level-rules to current scope:
This is kind of an advanced feature, and probably more thought would have to go into it for it to become really good, but I'm submitting now to start the discussion.
Thoughts?
When using fluent methods with different levels of semantic meaning, it can be difficult to maintain good readability with CSharpier currently, since it doesn't know the semantic difference between two fluent method calls. Here's a tiny example of using a
FluentMappingBuilder
from Linq2Db to setupInput:
Output:
Expected behavior:
But the issue is how we can teach CSharpier about the significance of calling
Entity<>()
vs for example callingProperty()
orHasColumnName()
. I was thinking that maybe a comment-style approach similar to how// csharpier-ignore
currently works might be a good solution. E.g. something like this to apply to level-rules to current scope:This is kind of an advanced feature, and probably more thought would have to go into it for it to become really good, but I'm submitting now to start the discussion. Thoughts?