public invoiceService addService(int serviceID, decimal amount) { using (var ctx = new AccContexts()) { var newInvoiceService = new AccountingLib.Models.invoiceService() { invoiceID = this.invoiceID, serviceID = serviceID, currencyID = this.currencyID, amount = amount }; ctx.invoiceService.AddObject(newInvoiceService); ctx.SaveChanges(); return(newInvoiceService); } }
public invoiceService addService(int serviceID,decimal amount) { using (var ctx = new AccContexts()) { var newInvoiceService= new AccountingLib.Models.invoiceService() { invoiceID=this.invoiceID, serviceID=serviceID, currencyID=this.currencyID, amount=amount }; ctx.invoiceService.AddObject(newInvoiceService); ctx.SaveChanges(); return newInvoiceService; } }
/// <summary> /// Create a new invoiceService object. /// </summary> /// <param name="id">Initial value of the ID property.</param> public static invoiceService CreateinvoiceService(global::System.Int32 id) { invoiceService invoiceService = new invoiceService(); invoiceService.ID = id; return invoiceService; }
/// <summary> /// Deprecated Method for adding a new object to the invoiceService EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToinvoiceService(invoiceService invoiceService) { base.AddObject("invoiceService", invoiceService); }