public int PostArrival_UZ_Document_Acts([FromBody] Arrival_UZ_Document_Acts 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_Document_Acts(int id) { try { Arrival_UZ_Document_Acts item = this.ef_ids .Context .Where(s => s.id == id) .ToList() .Select(c => c.GetArrival_UZ_Document_Acts()).FirstOrDefault(); return(Ok(item)); } catch (Exception e) { return(BadRequest(e.Message)); } }