Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

lajones
Copy link
Contributor

@lajones lajones commented Oct 9, 2015

Fix for issue #2947. Add in a new CodeWriter based on IndentedStringBuilder and remove RazorTemplateCodeWriter and its supporting code.

using (_sb.Indent())
{
var shouldAddNewLine = AddEntityFluentApi(fluentApiConfigurations);
shouldAddNewLine = AddPropertyConfigurations(shouldAddNewLine, propertyConfigurations);
Copy link
Contributor Author

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; }");
Copy link

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.

Copy link
Contributor Author

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.

@natemcmaster
Copy link
Contributor

:shipit:

@lajones
Copy link
Contributor Author

lajones commented Oct 14, 2015

Checked in with commit 1e09fed.

@lajones lajones closed this Oct 14, 2015
@lajones lajones added this to the 7.0.0-rc1 milestone Oct 14, 2015
@bricelam bricelam deleted the 151008-lajones_RemoveRazor_01 branch October 20, 2015 16:16
@ajcvickers ajcvickers removed this from the 1.0.0-rc1 milestone Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants