public override async Task PerformValidationChecks(DoctorEmployment entity, PermissionResolverResult permissionResult) { if (!await Context.IsForeignKeyValid <Doctor>(entity.DoctorId)) { throw new ValidationException($"Couldn't find Doctor with id: {entity.DoctorId}"); } if (!await Context.IsForeignKeyValid <Clinic>(entity.ClinicId)) { throw new ValidationException($"Couldn't find Clinic with id: {entity.ClinicId}"); } }
public virtual async Task PerformValidationChecks(TEntity entity, PermissionResolverResult permissionResult) { }