Это код:
Код: Выделить всё
int INT32ID = int.Parse(dataGridView1.CurrentRow.Cells[2].Value.ToString());
int StudentID = **Convert.ToInt64(INT32ID);**(here is the error)
var Student = DB.Students.Find(StudentID);
DB.Entry(Student).State = EntityState.Deleted;
Невозможно неявно преобразовать тип «long» в «int». Явное преобразование
существует (вам не хватает приведения?)
Подробнее здесь: https://stackoverflow.com/questions/736 ... 64-c-sharp
Мобильная версия