Ejemplo n.º 1
0
        public IEnumerable <CustoModel> GetComParametro(CustoQO custo)
        {
            try
            {
                if (!string.IsNullOrEmpty(custo.NomeCusto))
                {
                    return(CustoRepository.ListPorNomeCusto(custo.NomeCusto));
                }
                else
                {
                    List <CustoModel> listCusto = new List <CustoModel>();

                    listCusto.Add(CustoRepository.Find(custo.CustoId));

                    return(listCusto);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
Ejemplo n.º 2
0
 public IEnumerable <CustoModel> Get([FromQuery] CustoQO custo)
 {
     return(CustoService.GetComParametro(custo));
 }