async delete(entity) {
                this.#setDAOs(entity);
                let result = new Result();
                let nmClass = entity.constructor.name;
                let msg = await this.#executeRules(entity, "Delete");
                if (msg == undefined) {
                    let dao = this.#daos.get(nmClass);
                    try {
                        await dao.delete(entity);
                    } catch (err) {
                        console.log(err);
                    };
                }
                else {
                    result.setMsg(msg);
                };
                return result;
            }
//Execute the validation rules and call the respective DAO of the entity, to delete the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity, to delete the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity to delete the entity in the DataBase
async delete(entity) {
                this.#setDAOs(entity);
                let result = new Result();
                let nmClass = entity.constructor.name;
                let msg = await this.#executeRules(entity, "Delete");
                if (msg == undefined) {
                    let dao = this.#daos.get(nmClass);
                    try {
                        await dao.delete(entity);
                    } catch (err) {
                        console.log(err);
                    };
                }
                else {
                    result.setMsg(msg);
                };
                return result;
            }
async delete ( entity ) { this . #setDAOs ( entity ) ; let result = new Result ( ) ; let nmClass = entity . constructor . name ; let msg = await this . #executeRules ( entity , "Delete" ) ; if ( msg == undefined ) { let dao = this . #daos . get ( nmClass ) ; try { await dao . delete ( entity ) ; } catch ( err ) { console . log ( err ) ; } ; } else { result . setMsg ( msg ) ; } ; return result ; }
Execute the validation rules and call the respective DAO of the entity, to delete the entity in the DataBase
Execute the validation rules and call the respective DAO of the entity to delete the entity in the DataBase