Example #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the info EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToinfo(info info)
 {
     base.AddObject("info", info);
 }
Example #2
0
 /// <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;
 }
Example #3
0
        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;
            }
        }