How to use Entity Framework code-first to generate a clustered primary key? -


We have something in the SQL statement, some names have been omitted to save some space: < Pre> CREATE TABLE [dbo] [Payment] ([PaymentId] [uniqueidentifier] No NULL, [Itemid] [int] zero, ... barrier [PK_Payment] with primary key cluster ([PaymentId] ASC) (PAD_INDEX = closed, STATISTICS_NORECOMPUTE = closed, IGNORE_DUP_KEY = I can probably not say just this [primary] TEXTIMAGE_ON [Primary]

on [primary]) on ALLOW_ROW_LOCKS =, on the ALLOW_PROVOLOKKS =,

  HasKey (P = & gt; p.PaymentId)   

What is the correct way to generate this complicated code? Handicap is the section outline of the code in the code first?

I can not duplicate your problem Adjustment & gt; () .hasKey (a => a.Id) << / p>

  Protected Override Zero OnModelCreating (DbModelBuilder modelBuilder) {modelBuilder.Entity & lt: When I use the following code / Ex> 

Generate looks like SQL:.

  CREATE TABLE [dbo] [adjust]] ([id] [uniqueidentifier] NULL, // Exclude removed from additional unrelated areas [PK_dbo Edmonton] Primary Key Cluster ([ID] ASC) ( [Primary] TEXTIMAGE_ON [Primary]     on PAD_INDEX = closed, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON]

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -