예제 #1
0
        public ActionResult Delete(int id)
        {
            var userId = User.Identity.GetUserId();

            _filesService.Delete(id, userId);
            return(Redirect(Request.UrlReferrer.ToString()));
        }
 public IActionResult Delete(int id)
 {
     try
     {
         return(Ok(_filesService.Delete(id)));
     }
     catch (Exception e)
     {
         return(BadRequest(e.Message));
     }
 }
예제 #3
0
        //GET: api/Statement/5
        //public IHttpActionResult Get(int id)
        //{
        //    var result = svc.Find(id);
        //    return Ok(result);
        //}

        // PUT: api/Statement/5
        //public IHttpActionResult Put(int id, TransactionRule model)
        //{
        //    svc.Update(model);
        //    return Ok();
        //}

        // POST: api/Statement
        //public IHttpActionResult Post(TransactionRule model)
        //{
        //    svc.Add(model);
        //    return Ok();
        //}

        // DELETE: api/Statement/5
        public IHttpActionResult Delete(int id)
        {
            svc.Delete(id);
            return(Ok());
        }