Add this to your edit.cshtml
@Html.HiddenFor(model => model.Id)
I had this issue and found that the ID was coming across as 0 since it was not on the page.
I also have this on my ViewModel (I am using the view model approach)
[HiddenInput(DisplayValue = false)]
[Key]
public int Id { get; set; }