public static ListaReservaTO ListarPorTipoReserva(int idTipoReserva) { _Crud = CrudService <ReservaCrud> .ObterInstancia(); ListaReservaTO retorno = new ListaReservaTO(); try { retorno = _Crud.Listar(); if (retorno.Valido) { retorno.Lista = retorno.Lista.Where(x => x.IdTipoReserva == idTipoReserva).ToList(); } } catch (Exception ex) { retorno.Valido = false; retorno.Mensagem = string.Format("Erro: {0}", ex.Message); } return(retorno); }
public static ListaReservaTO Listar() { _Crud = CrudService <ReservaCrud> .ObterInstancia(); return(_Crud.Listar()); }