示例#1
0
        public async Task <viewModel.EntityView> Add([FromBody] transModel.EntityAdd add)
        {
            var addTrans = new trans.EntityTransactions();
            var result   = await addTrans.Add(add);

            return((viewModel.EntityView)result);
        }
示例#2
0
        public async Task <viewModel.EntityView> Update([FromRoute] int entityId, [FromBody] transModel.EntityUpdate update)
        {
            update.EntityId = entityId;
            var updateTrans = new trans.EntityTransactions();
            var result      = await updateTrans.Update(update);

            return((viewModel.EntityView)result);
        }
示例#3
0
 public async Task Delete([FromRoute] int entityId)
 {
     var deleteTrans  = new trans.EntityTransactions();
     var entityDelete = new transModel.EntityDelete()
     {
         EntityId = entityId
     };
     await deleteTrans.Delete(entityDelete);
 }