The problem is that you are trying to update the Document object that come from your view, and this is not OK, because it just a copy of your document from your database; and also the deleting and the reassigning the customers for each document update is not OK.
So in your controller class you should first search search by using Document ID (or its primary key) the current document, then update this object (that was read from the database context) with data that come from the view (user input that is cached in Document param from your method) and finally save it to the database. This should solve your problem!
So you should have:
public static bool UpdateDocument(Document documentToUpdate)
{
using (MyDbContext = new MyDbContext())
{
Document doc = MyDbContext.FirstOrDefault(d=> d.ID == documetToUpdate.ID)
CopyUserInputData(documentToUpdate, doc);
context.SaveChanges();
return true;
}
}