Example #1
0
 /// <summary>
 /// Deprecated Method for adding a new object to the DealContracts EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToDealContracts(DealContract dealContract)
 {
     base.AddObject("DealContracts", dealContract);
 }
Example #2
0
        private void SaveContract(string id, HttpPostedFileBase c)
        {
            Deal deal = Db.Deals.FirstOrDefault(a => a.Id == id);
            if (deal == null)
                return;

            FileStore fs = _fHelper.SaveContractFile(c);
            var contract = new Contract {FileStoreId = fs.Id};
            Db.Contracts.AddObject(contract);
            Db.SaveChanges();

            var dealContract = new DealContract {DealId = deal.Id, ContractId = contract.Id};
            Db.DealContracts.AddObject(dealContract);
            Db.SaveChanges();
        }
Example #3
0
 /// <summary>
 /// Create a new DealContract object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="dealId">Initial value of the DealId property.</param>
 /// <param name="contractId">Initial value of the ContractId property.</param>
 public static DealContract CreateDealContract(global::System.Int32 id, global::System.String dealId, global::System.Int32 contractId)
 {
     DealContract dealContract = new DealContract();
     dealContract.Id = id;
     dealContract.DealId = dealId;
     dealContract.ContractId = contractId;
     return dealContract;
 }