/// <summary>
 /// Deprecated Method for adding a new object to the Websites EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToWebsites(Website website)
 {
     base.AddObject("Websites", website);
 }
Пример #2
0
 private Website AddWebSite(int groupId, string domain)
 {
     Website result;
     using (var db = new NCrawlerEntitiesDbServices())
     {
         result = db.Websites.SingleOrDefault(m => m.GroupId == groupId);
         if (result == null)
         {
             result = new Website() { GroupId = groupId, Url = domain };
             db.Websites.AddObject(result);
             db.SaveChanges();
         }
         return result;
     }
 }
 /// <summary>
 /// Create a new Website object.
 /// </summary>
 /// <param name="websiteId">Initial value of the WebsiteId property.</param>
 /// <param name="url">Initial value of the Url property.</param>
 /// <param name="groupId">Initial value of the GroupId property.</param>
 public static Website CreateWebsite(global::System.Int32 websiteId, global::System.String url, global::System.Int32 groupId)
 {
     Website website = new Website();
     website.WebsiteId = websiteId;
     website.Url = url;
     website.GroupId = groupId;
     return website;
 }