protected void Logger(Exception ex)
        {
            var Log = new TBL_LOG
            {
                LOG_FECHA = DateTime.Now,
                LOG_ERROR = ex.Message,
                LOG_INNER = ex.InnerException?.Message,
            };

            BDD.TBL_LOG.Add(Log);
            BDD.Entry(Log).State = System.Data.Entity.EntityState.Added;

            BDD.SaveChanges();
        }
        private void Log(Exception ex)
        {
            using (var BDD = new PuquerosBDD())
            {
                var Log = new TBL_LOG
                {
                    LOG_FECHA = DateTime.Now,
                    LOG_ERROR = ex.Message,
                    LOG_INNER = ex.InnerException?.Message ?? "",
                };

                BDD.TBL_LOG.Add(Log);
                BDD.Entry(Log).State = System.Data.Entity.EntityState.Added;

                BDD.SaveChanges();
            }
        }