Ejemplo n.º 1
0
        public override clsAPIResponse call(clsCmd cmd)
        {
            var oCRUD = new NTier.CRUD.clsCRUD(_appService.getAdapter(), Table, Table, idField, isIdentity);

            try
            {
                oCRUD.delete(cmd);
                return(new clsAPIResponse()
                {
                    message = ""
                });
            }
            catch (Exception ex)
            {
                return(new clsAPIResponse()
                {
                    message = ex.Message
                });
            }
        }
Ejemplo n.º 2
0
        public clsAPIResponse delete(clsCmd cmd)
        {
            var response = validation_delete(cmd);

            if (response.isValid == false)
            {
                return(response);
            }

            var oCRUD = new NTier.CRUD.clsCRUD(_appService.getAdapter(), name, name, autoIncrementField, true);

            try
            {
                oCRUD.delete(cmd);
                return(clsAPIResponse.ok());
            }
            catch (Exception ex)
            {
                return(new clsAPIResponse()
                {
                    message = ex.Message
                });
            }
        }