Пример #1
0
        public async Task <ActionResult> ConfirmDelete(Sample sample)
        {
            if (sample != null)
            {
                await SamplesDao.Delete(this, sample);
            }

            return(RedirectToAction("Index"));
        }
Пример #2
0
        public async Task <IHttpActionResult> Delete(int sampleId)
        {
            var result = await SamplesDao.Delete(this, sampleId);

            if (result == null)
            {
                return(NotFound());
            }

            return(JsonWithPermissions(result));
        }