public ActionResult Delete(int Id) { _Repostory.Delete(Id); return(RedirectToAction("Index")); /* * using (var con = new MySqlConnection(myConnectionString)) * { * con.Open(); * var cmd = new MySqlCommand("DELETE FROM ogrenciler WHERE Id = "+Id, con); * cmd.ExecuteNonQuery(); * con.Close(); * return RedirectToAction("Index"); * } */ }
// DELETE: api/Home/5 public void Delete(int id) { _Repostory.Delete(id); }