Esempio n. 1
0
        public virtual async Task <ActionResponse> Delete(
            int id)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.MachineModelValidator.ValidateDeleteAsync(id));

            if (response.Success)
            {
                await this.MachineRepository.Delete(id);

                await this.mediator.Publish(new MachineDeletedNotification(id));
            }

            return(response);
        }