public bool Insert(TBoxAccountsVM entity)
        {
            TBOXACCOUNTS tBoxAcc = Mapper.Map <TBoxAccountsVM, TBOXACCOUNTS>(entity);
            TBOXACCOUNTS tBox    = tBoxAccRepo.Add(tBoxAcc);

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

            return(tBox != null ? true : false);
        }
 public Task <bool> InsertAsync(TBoxAccountsVM entity)
 {
     return(Task.Run <bool>(() =>
     {
         TBOXACCOUNTS tBoxAcc = Mapper.Map <TBoxAccountsVM, TBOXACCOUNTS>(entity);
         TBOXACCOUNTS tBox = tBoxAccRepo.Add(tBoxAcc);
         return tBox != null ? true : false;
     }));
 }
 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;
            }));
        }