public long PutOutgoingDetentionReturn(int id, [FromBody] OutgoingDetentionReturn value) { try { this.ef_ids.Update(value); int res = this.ef_ids.Save(); return(res > 0 ? value.id : res); } catch (Exception e) { return(-1); } }
public IHttpActionResult GetOutgoingDetentionReturn(int id) { try { OutgoingDetentionReturn dr = this.ef_ids .Context .Where(s => s.id == id) .ToList() .Select(c => c.GetOutgoingDetentionReturn()).FirstOrDefault(); return(Ok(dr)); } catch (Exception e) { return(BadRequest(e.Message)); } }