public void saveGate(gate gate) { if (gate.EntityKey == null) contexto.AddTogates(gate); contexto.SaveChanges(); }
/// <summary> /// Create a new gate object. /// </summary> /// <param name="id">Initial value of the id property.</param> /// <param name="name">Initial value of the name property.</param> /// <param name="status_id">Initial value of the status_id property.</param> /// <param name="latitude">Initial value of the latitude property.</param> /// <param name="longitude">Initial value of the longitude property.</param> public static gate Creategate(global::System.Int32 id, global::System.String name, global::System.Int32 status_id, global::System.Int32 latitude, global::System.Int32 longitude) { gate gate = new gate(); gate.id = id; gate.name = name; gate.status_id = status_id; gate.latitude = latitude; gate.longitude = longitude; return gate; }
/// <summary> /// Deprecated Method for adding a new object to the gates EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTogates(gate gate) { base.AddObject("gates", gate); }