コード例 #1
0
        public virtual ActionResult DeleteConfirmed(int id)
        {
            _transporterService.DeleteById(id);
            return(RedirectToAction("Index"));

            //repository.Transporter.DeleteByID(id);
            //return RedirectToAction("Index");
        }
コード例 #2
0
        public ActionResult EditingInline_Destroy([DataSourceRequest] DataSourceRequest request, Transporter transporter)
        {
            if (transporter != null)
            {
                transportService.DeleteById(transporter.TransporterID);
                transportService.DeleteTransporter(transporter);
            }

            return(Json(ModelState.ToDataSourceResult()));
        }