Example #1
0
        public ActionResult Index(string id = "")
        {
            if (string.IsNullOrEmpty(id))
            {
                return(View(DocumentoBL.Listar(null, x => x.OrderByDescending(y => y.DocumentoId),
                                               includeProperties: "TipoDoc,Oficina").Take(15).ToList()));
            }

            return(View(DocumentoBL.Listar(x => x.Nombre.Contains(id) || x.NroDoc.Contains(id),
                                           x => x.OrderByDescending(y => y.DocumentoId),
                                           includeProperties: "TipoDoc,Oficina")));
        }