Skip to content

RevEng: .Required() not generated for nullable CLR types that are NOT NULL in database #1935

@rowanmiller

Description

@rowanmiller
CREATE TABLE [dbo].[OrderShippingDetails](
    [Addressee] [nvarchar](max) NOT NULL,
    [CityOrTown] [nvarchar](max) NOT NULL,
    [Country] [nvarchar](max) NOT NULL,
    [LineOne] [nvarchar](max) NOT NULL,
    [LineTwo] [nvarchar](max) NULL,
    [OrderId] [int] NOT NULL,
    [StateOrProvince] [nvarchar](max) NOT NULL,
    [ZipOrPostalCode] [nvarchar](max) NOT NULL,
 CONSTRAINT [PK_OrderShippingDetails] PRIMARY KEY NONCLUSTERED 
(
    [OrderId] ASC
)
            modelBuilder.Entity<OrderShippingDetails>(entity =>
                {
                    entity.Key(e => e.OrderId);
                }
            );

Note that there is no Required() call for Addressee etc.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions