public RedirectToRouteResult Crear(EstadoNieve[] estados)
        {
            foreach (EstadoNieve e in estados)
                db.EstadosNieve.AddObject(e);
            db.SaveChanges();

            foreach (EstadoNieve e in estados)
                e.PuntoNieve.UltEstado = e.ID;
            db.SaveChanges();

            return RedirectToAction("Index");
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the EstadosNieve EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEstadosNieve(EstadoNieve estadoNieve)
 {
     base.AddObject("EstadosNieve", estadoNieve);
 }
 /// <summary>
 /// Create a new EstadoNieve object.
 /// </summary>
 /// <param name="id">Initial value of the ID property.</param>
 /// <param name="fecha">Initial value of the Fecha property.</param>
 /// <param name="puntoNieveID">Initial value of the PuntoNieveID property.</param>
 /// <param name="nieveCaida">Initial value of the NieveCaida property.</param>
 /// <param name="nieveAcumulada">Initial value of the NieveAcumulada property.</param>
 /// <param name="viento">Initial value of the Viento property.</param>
 public static EstadoNieve CreateEstadoNieve(global::System.Int64 id, global::System.DateTime fecha, global::System.Int16 puntoNieveID, global::System.Double nieveCaida, global::System.Double nieveAcumulada, global::System.Double viento)
 {
     EstadoNieve estadoNieve = new EstadoNieve();
     estadoNieve.ID = id;
     estadoNieve.Fecha = fecha;
     estadoNieve.PuntoNieveID = puntoNieveID;
     estadoNieve.NieveCaida = nieveCaida;
     estadoNieve.NieveAcumulada = nieveAcumulada;
     estadoNieve.Viento = viento;
     return estadoNieve;
 }