Example #1
0
            public async Task <Payment> Add(Payment newPayment)
            {
                using (var db = new InvoiceMsDbContext(_dbName)) {
                    await db.AddAsync(newPayment);

                    await db.SaveChangesAsync();

                    return(newPayment);
                }
            }
Example #2
0
            public async Task <Invoice> Add(Invoice newInvoice)
            {
                using (var db = new InvoiceMsDbContext(_dbName)) {
                    await db.AddAsync(newInvoice);

                    await db.SaveChangesAsync();

                    return(newInvoice);
                }
            }