Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public async Task Delete([FromRoute] int customerId)
 {
     var deleteTrans    = new trans.CustomerTransactions();
     var customerDelete = new transModel.CustomerDelete()
     {
         CustomerId = customerId
     };
     await deleteTrans.Delete(customerDelete);
 }