Skip to content

Commit

Permalink
Update to generate a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ajcvickers committed Nov 12, 2020
1 parent f57176c commit 1b1dcc3
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ public class CSharpDbContextGenerator : ICSharpDbContextGenerator

_sb.AppendLine();

_sb.AppendLine("#nullable disable");
_sb.AppendLine("// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.");
_sb.AppendLine("// If you have enabled NRTs for your project, then un-comment the following line:");
_sb.AppendLine("// #nullable disable");
_sb.AppendLine();

_sb.AppendLine($"namespace {finalContextNamespace}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ public virtual string WriteCode(IEntityType entityType, string @namespace, bool
}

_sb.AppendLine();
_sb.AppendLine("#nullable disable");
_sb.AppendLine("// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.");
_sb.AppendLine("// If you have enabled NRTs for your project, then un-comment the following line:");
_sb.AppendLine("// #nullable disable");

_sb.AppendLine();
_sb.AppendLine($"namespace {@namespace}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ public void Empty_model()
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down Expand Up @@ -82,7 +84,9 @@ public void SuppressConnectionStringWarning_works()
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ public void Navigation_properties()
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down Expand Up @@ -100,7 +102,9 @@ public void Navigation_property_with_same_type_and_navigation_name()
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down Expand Up @@ -157,7 +161,9 @@ public void Navigation_property_with_same_type_and_property_name()
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down Expand Up @@ -215,7 +221,9 @@ public void Navigation_property_with_same_type_and_other_navigation_name()
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down Expand Up @@ -284,7 +292,9 @@ public void Composite_key()
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// Code scaffolded by EF Core assumes nullable reference types (NRTs) are not used or disabled.
// If you have enabled NRTs for your project, then un-comment the following line:
// #nullable disable
namespace TestNamespace
{
Expand Down

1 comment on commit 1b1dcc3

@ErikEJ
Copy link
Contributor

@ErikEJ ErikEJ commented on 1b1dcc3 Nov 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to add very little value...

Please sign in to comment.