コード例 #1
0
 /// <summary>
 /// Create a new ProductInfo object.
 /// </summary>
 /// <param name="productInfoId">Initial value of the ProductInfoId property.</param>
 /// <param name="websiteId">Initial value of the WebsiteId property.</param>
 /// <param name="url">Initial value of the Url property.</param>
 public static ProductInfo CreateProductInfo(global::System.Int32 productInfoId, global::System.Int32 websiteId, global::System.String url)
 {
     ProductInfo productInfo = new ProductInfo();
     productInfo.ProductInfoId = productInfoId;
     productInfo.WebsiteId = websiteId;
     productInfo.Url = url;
     return productInfo;
 }
コード例 #2
0
ファイル: StoreProcessor.cs プロジェクト: GBmono/GBmonoV1.0
 private ProductInfo AddProduct(string url, int siteId)
 {
     ProductInfo result;
     using (var db = new NCrawlerEntitiesDbServices())
     {
         result = db.ProductInfoes.SingleOrDefault(m => m.Url == url);
         if (result == null)
         {
             result = new ProductInfo() { WebsiteId = siteId, Url = url };
             db.ProductInfoes.AddObject(result);
             db.SaveChanges();
         }
         return result;
     }
 }
コード例 #3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductInfoes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductInfoes(ProductInfo productInfo)
 {
     base.AddObject("ProductInfoes", productInfo);
 }