Occurs when I try to set the identity_insert to ON in the SQL DATAMANAGEMENT STUDIO.
The worst is I do not know why should I deal with this value, and I am not even sure that the following code hits more than the copy of the database in the local memory.
I have got this message previously, when the debug hits the SaveChanges line : "Cannot insert explicit value for identity column in table 'tblCustomer' when IDENTITY_INSERT is set to OFF"
    ` public ActionResult Submit( 
    Customer obj) //validation runs 
    { 
        if (ModelState.IsValid)
        {
            CustomerDal Dal = new CustomerDal();
            Dal.Customer.Add(obj);     //in memory
            Dal.SaveChanges();          //physical commit 
            return View("Customer", obj);
        }
        else
        { 
            return View("EnterCustomer", obj);
        }
    }`
    public class Customer
{
    [Key]
    [Required]
    [DatabaseGenerated(DatabaseGeneratedOption.none)]
    public string CustomerCode { get; set; }
    [Required]
    [StringLength(10)]
    [RegularExpression("^[A-Z]{7,7}$")]
    public string CustomerName { get; set; }
}
    public class CustomerDal : DbContext 
{
    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        base.OnModelCreating(modelBuilder);
        modelBuilder.Entity<Customer>().ToTable("tblCustomer");
    }
    public DbSet<Customer> Customer { get; set; }
}
CREATE TABLE [dbo].[tblCustomer](
[CustomerCode] [varchar](50) NOT NULL,
[CustomerName] [varchar](50) NULL,
CONSTRAINT [PK_tblCustomer] PRIMARY KEY CLUSTERED
(
[CustomerCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF,
IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)
ON [PRIMARY]
) ON [PRIMARY]
    @using (Html.BeginForm("Submit", "Customer", FormMethod.Post))
    {
        <i>Customer Name : </i> @Html.TextBoxFor(m => m.CustomerName)
    <br>
    @Html.ValidationMessageFor(x => x.CustomerName)
    <br>
        <i>Customer Code : </i> @Html.TextBoxFor(m => m.CustomerCode)
            <br>
            @Html.ValidationMessageFor(x => x.CustomerCode)
            <br>
            <input id = "Submit1" type = "submit" value = "submit"/>
            }