public async Task <ActionResult> ConfirmDelete(Sample sample) { if (sample != null) { await SamplesDao.Delete(this, sample); } return(RedirectToAction("Index")); }
public async Task <IHttpActionResult> Delete(int sampleId) { var result = await SamplesDao.Delete(this, sampleId); if (result == null) { return(NotFound()); } return(JsonWithPermissions(result)); }