/// <summary> /// Deprecated Method for adding a new object to the TempInteractions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTempInteractions(TempInteraction tempInteraction) { base.AddObject("TempInteractions", tempInteraction); }
/// <summary> /// Create a new TempInteraction object. /// </summary> /// <param name="interactionID">Initial value of the InteractionID property.</param> public static TempInteraction CreateTempInteraction(global::System.Int32 interactionID) { TempInteraction tempInteraction = new TempInteraction(); tempInteraction.InteractionID = interactionID; return tempInteraction; }
private void entityframeworkInsert(IQueryable<Interaction> query) { Entities context = new Entities(); try { foreach (Interaction loginteraction in query) { TempInteraction tinteraction = new TempInteraction(); tinteraction.BannerID = Convert.ToInt32(loginteraction.BannerID); tinteraction.TagName = Convert.ToString(loginteraction.TagName); tinteraction.EventID = Convert.ToInt32(loginteraction.EventID); tinteraction.EventValue = Convert.ToString(loginteraction.EventValue); tinteraction.DateStamp = Convert.ToDateTime(loginteraction.DateStamp.ToLocalTime()); tinteraction.Session = Convert.ToString(loginteraction.SessionID); try { context.AddToTempInteractions(tinteraction); context.SaveChanges(); } catch (Exception ex) { Console.WriteLine(ex); } } } catch (Exception ex) { Console.WriteLine(ex); } }