/// <summary>
 /// Deprecated Method for adding a new object to the AssemblyInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToAssemblyInfoes(AssemblyInfo assemblyInfo)
 {
     base.AddObject("AssemblyInfoes", assemblyInfo);
 }
 /// <summary>
 /// Create a new AssemblyInfo object.
 /// </summary>
 /// <param name="assemblyId">Initial value of the AssemblyId property.</param>
 /// <param name="created">Initial value of the Created property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 public static AssemblyInfo CreateAssemblyInfo(global::System.Guid assemblyId, global::System.DateTime created, global::System.String name)
 {
     AssemblyInfo assemblyInfo = new AssemblyInfo();
     assemblyInfo.AssemblyId = assemblyId;
     assemblyInfo.Created = created;
     assemblyInfo.Name = name;
     return assemblyInfo;
 }
 public void AddAssemblyInfo()
 {
     if (!this.OpenConnection()) return;
     var ainfo = objectContext.AssemblyInfoes.FirstOrDefault(a => a.AssemblyId == this.currentAssemblyGuid);
     if (ainfo != null)
     {
         if (this.cacheVersion.Version >= 0 || this.cacheVersion.SetBaseLine)
         {
             ainfo.Version = this.cacheVersion.Version;
             if (this.cacheVersion.SetBaseLine)
             {
                 // only ever set it. Don't clear it.
                 ainfo.IsBaseLine = this.cacheVersion.SetBaseLine;
             }
             this.TrySaveChanges(now: true);
         }
         return;
     }
     ainfo = new AssemblyInfo { 
         AssemblyId = this.currentAssemblyGuid,
         Created = DateTime.Now,
         Version = this.cacheVersion.Version,
         IsBaseLine = this.cacheVersion.SetBaseLine,
         Name = this.currentAssembly,
     };
     objectContext.AssemblyInfoes.AddObject(ainfo);
     this.TrySaveChanges(now: true);
 }