Have a problem with incrementing. I created a new object and tried set it into my DB I received an error of data violation. The index in table wasn\'t increased (Id=0). Id
Entity Framework does not automatically increment IDs. That's the database's job. Set the ID column on the database table as an IDENTITY column so that it will auto-increment. Then you should find that after you SaveChanges()
the phone's ID property will have been set to the value the database chose for it.