ahmed salah

ahmed salah

  • NA
  • 530
  • 148.8k

How to solve problems of identity column

Nov 17 2016 7:26 AM
I work with code first technique in visual studio 2015 with entity framework  6.1.3
 
but i have some questions confuse so that if possible i need answer to these questions 
 
1 - IF I have table name student and it have primary key column StudentID.
to add data to table student must StudentID column be identity or what.
 
2- if i have table student and column StudentID  primary key but not identity
and table already create but suddenly i need to change column StudentID
to identity what i do to make it identity .
.table not have any data .
 
3 - if i need to start by number 1800 in column StudentID then after that
make it identity what i do
 
I can do answer to all question above if i do it by sql
but if i need to answer these questions from visual studio 2015
How i do 
 
 

Answers (1)