-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RevEng: Remove Razor dependency #3393
Conversation
…ved Razor dependency.
using (_sb.Indent()) | ||
{ | ||
var shouldAddNewLine = AddEntityFluentApi(fluentApiConfigurations); | ||
shouldAddNewLine = AddPropertyConfigurations(shouldAddNewLine, propertyConfigurations); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about this some more - will make shouldAddNewLine
into member rather than passing it around.
|
||
_sb.AppendLine("public " | ||
+ _cSharpUtilities.GetTypeName(property.ClrType) | ||
+ " " + property.Name + " { get; set; }"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this behave when there's default value for the property? or when it's getter only vice versa, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only for reverse engineering. We produce both getter and setter in the generated code. The customer is free to remove the setter once the code has been generated (along with any other changes) if that better suits their model. Default values are assigned via fluent API in the generated DbContext sub-class.
Checked in with commit 1e09fed. |
Fix for issue #2947. Add in a new
CodeWriter
based onIndentedStringBuilder
and removeRazorTemplateCodeWriter
and its supporting code.