コード例 #1
0
        public async Task <IActionResult> FindPrivateCreditData([Required] CollectionSpecification <string> specification)
        {
            List <string> personalIds = specification.ResolveIds();

            if (!personalIds.Any())
            {
                return(BadRequest(new { Message = "At least one persomal id required." }));
            }
            var result = await this.creditService.GetCreditPrivatesAsync(personalIds);

            return(Ok(result));
        }
コード例 #2
0
        public async Task <IActionResult> FindCompaniesCreditData([Required] CollectionSpecification <string> specification)
        {
            List <string> companyIds = specification.ResolveIds();

            if (!companyIds.Any())
            {
                return(BadRequest(new { Message = "At least one company id required." }));
            }

            var result = await this.companyService.FindCompaniesCreditDataAsync(companyIds);

            return(Ok(result));
        }
コード例 #3
0
        public async Task <IActionResult> Find([Required] CollectionSpecification <string> specification, [FromQuery] RequestType type = RequestType.Ligth)
        {
            List <string> companyIds = specification.ResolveIds();

            if (!companyIds.Any())
            {
                return(BadRequest(new { Message = "At least one company id required." }));
            }

            var result = await this.companyService.FindCompaniesAsync(companyIds, type);

            return(Ok(result));
        }