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