public List <EntregaAlmacen> GetbyIdKey(string id) { try { EntregaAlmacen_Filter[] filtro = new EntregaAlmacen_Filter[2]; //Filtro Empleado filtro[0] = new EntregaAlmacen_Filter(); filtro[0].Field = EntregaAlmacen_Fields.Cod_Empleado; filtro[0].Criteria = id; //Filtro Empleado filtro[1] = new EntregaAlmacen_Filter(); filtro[1].Field = EntregaAlmacen_Fields.Entregado; filtro[1].Criteria = "No"; return(Context.contextEntregaAlmacenEpis.ReadMultiple(filtro, null, 0).ToList()); } catch (ArgumentNullException) { throw new ArgumentNullException("id", "El parametro 'id' no puede vernir vacio"); } catch (Exception ex) { throw new Exception(string.Format("{0} mensaje: {1}", "[Metodo GetbyIdKey] [id] ", ex.Message), ex.InnerException); } }
public IHttpActionResult Get(string id) { OpenService(); if (entregaAlmacenServicio != null) { EntregaAlmacen_Filter[] filtro = new EntregaAlmacen_Filter[2]; //Filtro Empleado filtro[0] = new EntregaAlmacen_Filter(); filtro[0].Field = EntregaAlmacen_Fields.Cod_Empleado; filtro[0].Criteria = id; //Filtro Empleado filtro[1] = new EntregaAlmacen_Filter(); filtro[1].Field = EntregaAlmacen_Fields.Entregado; filtro[1].Criteria = "No"; var entrega = entregaAlmacenServicio.ReadMultiple(filtro, null, 0).ToList(); return(Ok(entrega)); } return(null); }