private static void SaveToDb(Runtime runtimeDb) { var ctx = new Entities(); ctx.Runtimes.AddObject(runtimeDb); ctx.SaveChanges(); }
/// <summary> /// Deprecated Method for adding a new object to the Runtimes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRuntimes(Runtime runtime) { base.AddObject("Runtimes", runtime); }
private static Runtime CreateDbEntity(int runtime, int checkpointId) { Runtime runtimeDb = new Runtime(); runtimeDb.Runtime1 = runtime; runtimeDb.CheckpointID = checkpointId; return runtimeDb; }
/// <summary> /// Create a new Runtime object. /// </summary> /// <param name="runtimeID">Initial value of the RuntimeID property.</param> /// <param name="runtime1">Initial value of the Runtime1 property.</param> /// <param name="checkpointID">Initial value of the CheckpointID property.</param> /// <param name="isMerged">Initial value of the IsMerged property.</param> /// <param name="isDeleted">Initial value of the IsDeleted property.</param> public static Runtime CreateRuntime(global::System.Int32 runtimeID, global::System.Int32 runtime1, global::System.Int32 checkpointID, global::System.Boolean isMerged, global::System.Boolean isDeleted) { Runtime runtime = new Runtime(); runtime.RuntimeID = runtimeID; runtime.Runtime1 = runtime1; runtime.CheckpointID = checkpointID; runtime.IsMerged = isMerged; runtime.IsDeleted = isDeleted; return runtime; }