示例#1
0
        public virtual async Task <ActionResponse> Delete(
            int id)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.SelfReferenceModelValidator.ValidateDeleteAsync(id));

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

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

            return(response);
        }
示例#2
0
        public virtual async Task <ActionResponse> Delete(
            int personId)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.VPersonModelValidator.ValidateDeleteAsync(personId));

            if (response.Success)
            {
                await this.VPersonRepository.Delete(personId);

                await this.mediator.Publish(new VPersonDeletedNotification(personId));
            }

            return(response);
        }
        public virtual async Task <ActionResponse> Delete(
            int id)
        {
            ActionResponse response = ValidationResponseFactory <object> .ActionResponse(await this.TestAllFieldTypesNullableModelValidator.ValidateDeleteAsync(id));

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

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

            return(response);
        }