// Delete Button Details// private void button3_Click(object sender, EventArgs e) { iselibraryEntities ise = new iselibraryEntities(); foreach(var item in dataGridView1.Rows) { DataGridViewRow row = item as DataGridViewRow; if(row.Selected) { string usn = row.Cells["USN"].Value.ToString(); var issu = ise.T_BOOK_ISSUE_TABLE.FirstOrDefault(a => a.USN.Equals(usn)); if(issu!=null) { ise.T_BOOK_ISSUE_TABLE.remove } } }
Thing is I don't get a dropdown for remove in if loop after ise.T_BOOK_ISSUE_TABLE
.
Error says as 'Object Query<T_BOOK_ISSUE_TABLE>' does not contain a definition for 'remove' and no extension method 'remove' accepting a first argument of type'Object Query<T_BOOK_ISSUE_TABLE>'could be found(are you missing a directive or an assembly reference?)