public Task <bool> UpdateAsync(TBoxAccountsVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         TBOXACCOUNTS tBoxAcc = Mapper.Map <TBoxAccountsVM, TBOXACCOUNTS>(entity);
         TBOXACCOUNTS tBox = tBoxAccRepo.Update(tBoxAcc, tBoxAcc.BOXACC_ID);
         return tBox != null ? true : false;
     }));
 }
        public bool Delete(TBoxAccountsVM entity)
        {
            TBOXACCOUNTS tBoxAcc = new TBOXACCOUNTS
            {
                BOXACC_ID = entity.BOXACC_ID
            };

            tBoxAccRepo.Delete(tBoxAcc, entity.BOXACC_ID);
            return(true);
        }
        public Task <bool> DeleteAsync(TBoxAccountsVM entity)
        {
            return(Task.Run <bool>(() =>
            {
                TBOXACCOUNTS tBoxAcc = new TBOXACCOUNTS
                {
                    BOXACC_ID = entity.BOXACC_ID
                };

                tBoxAccRepo.Delete(tBoxAcc, entity.BOXACC_ID);
                return true;
            }));
        }
Ejemplo n.º 4
0
 public async Task <IHttpActionResult> delete([FromBody] TBoxAccountsVM entity)
 {
     return(Ok(await tBoxAccService.DeleteAsync(entity)));
 }
Ejemplo n.º 5
0
 public async Task <IHttpActionResult> add([FromBody] TBoxAccountsVM entity)
 {
     return(Ok(await tBoxAccService.InsertAsync(entity)));
 }