public IActionResult GetFilters(Parameters parameters) { try { PomasLogic pomasLogic = new PomasLogic(this._dataContext); var List = pomasLogic.GetData(parameters.TipoExportar); List = pomasLogic.GetFilter(List, parameters); return(Ok(new { Data = List, Success = true })); }catch (Exception ex) { return(BadRequest(new { Data = ex.Message, Success = false })); } }
public object Get() { List <object> retList = new List <object>(); PomasLogic pomasLogic = new PomasLogic(this._dataContext); var List = pomasLogic.GetData(); List.ToList().ForEach(x => { List <int> palets = x.Frutas.Select(s => s.IdPallet).ToList(); if (!_dataContext.Tracking.Where(a => palets.Contains(a.Palet.ID)).Any()) { retList.Add(x); } }); return(retList); }