예제 #1
0
        private async Task ValidateRelation(MarriageDoc marriageDoc)
        {
            var allDocTypeRelations = await _lookupsService.GetLookups <DocumentTypeRelation>();

            var docType = await GetDocType();

            if (!allDocTypeRelations.Any(a => a.DocumentTypeId == docType.Id && a.RelationId == marriageDoc.RelationId))
            {
                throw new DomainException($"The relation of the requester and the marriage document owner is not valid.\r\nMarriageDoc Name: {marriageDoc?.Name?.FullName}, RelationId:{marriageDoc?.RelationId}");
            }
        }
예제 #2
0
        public async Task <IEnumerable <LookupBaseResource> > GetGendersAsync()
        {
            var gendersResource = _mapper.Map <IEnumerable <LookupBase>, IEnumerable <LookupBaseResource> >(await _lookupsService.GetLookups <Gender>());

            return(gendersResource);
        }