protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
        public static bool  Insertar(Estudiantes est)
        {
            bool retorno = false;

            try
            {
                var db = new EjemploDetalleDb();

                db.Estudiantes.Add(est);
                db.SaveChanges();
                db.Dispose();

                retorno = true;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }

            return(retorno);
        }