public long PostArrival_UZ_Vagon_Cont([FromBody] Arrival_UZ_Vagon_Cont value) { try { this.ef_ids.Add(value); int res = this.ef_ids.Save(); return(res > 0 ? value.id : res); } catch (Exception e) { return(-1); } }
public IHttpActionResult GetArrival_UZ_Vagon_Cont(long id) { try { Arrival_UZ_Vagon_Cont item = this.ef_ids .Context .Where(s => s.id == id) .ToList() .Select(c => c.GetArrival_UZ_Vagon_Cont()).FirstOrDefault(); return(Ok(item)); } catch (Exception e) { return(BadRequest(e.Message)); } }