public async Task <viewModel.CustomerView> Add([FromBody] transModel.CustomerAdd add) { var addTrans = new trans.CustomerTransactions(); var result = await addTrans.Add(add); return((viewModel.CustomerView)result); }
public async Task <viewModel.CustomerView> Update([FromRoute] int customerId, [FromBody] transModel.CustomerUpdate update) { update.CustomerId = customerId; var updateTrans = new trans.CustomerTransactions(); var result = await updateTrans.Update(update); return((viewModel.CustomerView)result); }
public async Task Delete([FromRoute] int customerId) { var deleteTrans = new trans.CustomerTransactions(); var customerDelete = new transModel.CustomerDelete() { CustomerId = customerId }; await deleteTrans.Delete(customerDelete); }