public static object Listar_Usuarios(int jtStartIndex, int jtPageSize, String nombre) { try { int total = 0; List <SPC_GET_USUARIO_Result> Resultado = null; using (var DB = new TPVDBEntities()) { Resultado = DB.SPC_GET_USUARIO(null, null, null, null, nombre, null, true).ToList(); total = Resultado.Count(); } return(new { Result = "OK", Records = Resultado.Skip(jtStartIndex).Take(jtPageSize), TotalRecordCount = total }); } catch { return(new { Result = "ERROR", Message = "Ha ocurrido un error al cargar el listado de Usuarios." }); } }