public CampaignDetail Create(int campaignID,int contractDetailID) { CampaignDetail old = DB.CampaignDetails.Where(r => r.CampaignID == campaignID && r.ContractDetailID == contractDetailID).SingleOrDefault(); if (old != null) return null; CampaignDetail e = new CampaignDetail(); e.CampaignID = campaignID; e.ContractDetailID = contractDetailID; DB.CampaignDetails.AddObject(e); return e; }
/// <summary> /// Deprecated Method for adding a new object to the CampaignDetails EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToCampaignDetails(CampaignDetail campaignDetail) { base.AddObject("CampaignDetails", campaignDetail); }
/// <summary> /// Create a new CampaignDetail object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static CampaignDetail CreateCampaignDetail(global::System.Int32 id) { CampaignDetail campaignDetail = new CampaignDetail(); campaignDetail.ID = id; return campaignDetail; }