public IHttpActionResult GetLnkUDO() { try { EFLnkUDO ef_act = new EFLnkUDO(new EFDbContext()); List <LnkUDO> list = ef_act .Context .ToList() .Select(m => m.GetLnkUDO()) .ToList(); return(Ok(list)); } catch (Exception e) { return(BadRequest(e.Message)); } }
public IHttpActionResult GetLnkUDOOfID(int id) { try { EFLnkUDO ef_act = new EFLnkUDO(new EFDbContext()); LnkUDO link = ef_act .Context .Where(d => d.idLinkUDO == id) .ToList() .Select(m => m.GetLnkUDO()) .FirstOrDefault(); return(Ok(link)); } catch (Exception e) { return(BadRequest(e.Message)); } }