title: How to set starting value for an Identity primary key in Entity Framework code first?
body: <p>In my project I am creating the <code>Appointments</code> table using Entity Framework code first. When I set my integer primary key, <code>AppointmentNo</code> as <code>[Key]</code> and <code>[Required]</code>, it creates the table with initial primary key starting with 1. </p>
  
  <p>I want the appointment numbers to start at 1000. My database is SQL Server. Please help me. Thank you in advance. </p>
  
  <pre><code>[DataContract]
  public class Appointment
  {
      [DataMember]
      [Key]
      [Required]
      public int AppointmentNo { get; set; }
  
      [DataMember]
      [Required]
      public string DoctorUN { get; set; }
  
      [DataMember]
      [Required]
      public string PatientUN { get; set; }
  }
  </code></pre>