示例#1
0
 public static List <Cliente> Listar()
 {
     try
     {
         return(ClienteRep.Listar());
     }
     catch (Exception)
     {
         throw;
     }
 }
        // GET: /<controller>/

        public IActionResult Index()

        {
            List <Cliente> lstCliente = new List <Cliente>();

            try

            {
                ClienteRep objClienteRep = new ClienteRep();
                lstCliente = objClienteRep.Listar().ToList();
            }

            catch (System.Exception ex)

            {
                TempData["Erro"] = ex.Message;
            }



            return(View(lstCliente));
        }
示例#3
0
 public static List <Cliente> Listar()
 {
     return(ClienteRep.Listar());
 }