public async Task <bool> ValidateId(ActivityStatus ActivityStatus) { ActivityStatusFilter ActivityStatusFilter = new ActivityStatusFilter { Skip = 0, Take = 10, Id = new IdFilter { Equal = ActivityStatus.Id }, Selects = ActivityStatusSelect.Id }; int count = await UOW.ActivityStatusRepository.Count(ActivityStatusFilter); if (count == 0) { ActivityStatus.AddError(nameof(ActivityStatusValidator), nameof(ActivityStatus.Id), ErrorCode.IdNotExisted); } return(count == 1); }