Esempio n. 1
0
        public async Task <Organization[]> GetByOgrnAsync(string ogrn, PartyBranchType?branchType)
        {
            var cachedOrgs = await CacheRepository.FindByOgrn(ogrn, branchType);

            if (cachedOrgs.Any())
            {
                return(cachedOrgs);
            }

            await UpsertAsync(ogrn, findById : true, branchType : branchType);

            return(await CacheRepository.FindByOgrn(ogrn, branchType));
        }