/// <summary> /// Deprecated Method for adding a new object to the info EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToinfo(info info) { base.AddObject("info", info); }
/// <summary> /// Create a new info object. /// </summary> /// <param name="id">Initial value of the id property.</param> public static info Createinfo(global::System.Int64 id) { info info = new info(); info.id = id; return info; }
public void GetTvDbServerTime() { int time = TvDb.GetServerTime(); try { using (SABSyncEntities sabSyncEntities = new SABSyncEntities()) { if ((from i in sabSyncEntities.info select i).Count() != 0) //Get the count of items in info, if not 0 then return (Time was already added). return; info newTime = new info() { id = new long(), last_tvdb = time }; sabSyncEntities.AddToinfo(newTime); sabSyncEntities.SaveChanges(); } } catch (Exception ex) { Logger.Log(ex.ToString()); throw; } }