Skip to content

Commit

Permalink
Make compiled model classes public and supporting classes internal
Browse files Browse the repository at this point in the history
Part of #25812
  • Loading branch information
AndriySvyryd authored Sep 10, 2021
1 parent 647a6e1 commit 9f863be
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private string CreateModel(
var className = _code.Identifier(contextType.ShortDisplayName()) + ModelSuffix;
mainBuilder
.Append("[DbContext(typeof(").Append(_code.Reference(contextType)).AppendLine("))]")
.Append("partial class ").Append(className).AppendLine(" : " + nameof(RuntimeModel))
.Append("public partial class ").Append(className).AppendLine(" : " + nameof(RuntimeModel))
.AppendLine("{");

using (mainBuilder.Indent())
Expand Down Expand Up @@ -219,7 +219,7 @@ private string CreateModelBuilder(

var className = _code.Identifier(contextType.ShortDisplayName()) + ModelSuffix;
mainBuilder
.Append("partial class ").AppendLine(className)
.Append("public partial class ").AppendLine(className)
.AppendLine("{");

using (mainBuilder.Indent())
Expand Down Expand Up @@ -474,7 +474,7 @@ private string GenerateEntityType(IEntityType entityType, string @namespace, str
}

mainBuilder
.Append("partial class ").AppendLine(className)
.Append("internal partial class ").AppendLine(className)
.AppendLine("{");
using (mainBuilder.Indent())
{
Expand Down
Loading

0 comments on commit 9f863be

Please sign in to comment.