Ejemplo n.º 1
0
        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");
             * }
             */
        }
Ejemplo n.º 2
0
 // DELETE: api/Home/5
 public void Delete(int id)
 {
     _Repostory.Delete(id);
 }