public async Task <IHttpActionResult> Read(int sampleId) { var result = await SamplesDao.Read(this, sampleId); if (result == null) { return(NotFound()); } return(JsonWithPermissions(result)); }
public async Task <IHttpActionResult> Update(int sampleId, SamplesEditViewModel model) { var sample = await SamplesDao.Read(this, sampleId); if (sample == null) { return(NotFound()); } var result = await SamplesDao.Update(this, sample, model); return(JsonWithPermissions(result)); }