Esempio n. 1
0
        public async Task <IActionResult> MatchCommercialProperty([FromBody] CommercialQuery query)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            else
            {
                switch (query.purpose)
                {
                case Purpose.Rent:
                    return(Ok(await _matchHelper.MatchCommercialRentalProperty(query)));

                case Purpose.Sale:
                    return(Ok(await _matchHelper.MatchCommercialSaleProperty(query)));

                default:
                    return(Ok(await _matchHelper.MatchCommercialRentalProperty(query)));
                }
            }
        }