Ejemplo n.º 1
0
        // DELETE: api/Match/5
        public IHttpActionResult Delete(int id)
        {
            var model = iplayerscore.GetById(id);

            if (model == null)
            {
                return(NotFound());
            }
            iplayerscore.DeleteModel(model);
            iplayerscore.Save();
            return(Ok(model));
        }
Ejemplo n.º 2
0
        // DELETE: api/PlayerAPI/5
        public HttpResponseMessage Delete(HttpRequestMessage request, int id)
        {
            var model = iplayer.GetById(id);

            if (model == null)
            {
                return(request.CreateResponse(HttpStatusCode.NotFound, "Data is Not found"));
            }
            iplayer.DeleteModel(model);
            iplayer.Save();
            return(request.CreateResponse(HttpStatusCode.OK, "Data is deleted Successfully"));
        }
        // DELETE: api/Match/5
        public IHttpActionResult Delete(int id)
        {
            var model = imatchpalyer.GetById(id);

            if (model == null)
            {
                return(NotFound());
            }
            imatchpalyer.DeleteModel(model);
            imatchpalyer.Save();
            return(Ok(model));
        }
 public ActionResult Delete(int id, User collection)
 {
     try
     {
         // TODO: Add delete logic here
         interfaceobj.DeleteModel(collection);
         interfaceobj.Save();
         return(RedirectToAction("Index"));
     }
     catch (Exception ex)
     {
         return(View());
     }
 }