Example #1
0
 public async Task <ActionResult <List <PolygonApiModel> > > GetPolygonsByListOfIdsAsync([FromQuery] List <int> ids)
 {
     try
     {
         return(new ObjectResult(await _polygonMapSupervisor.GetPolygonsByListOfIdsAsync(ids)));
     }
     catch (Exception ex)
     {
         return(StatusCode(500, ex));
     }
 }
Example #2
0
        public async Task <ActionResult <List <PolygonApiModel> > > GetPolygonsByListOfIdsAsync([FromQuery] List <int> ids)
        {
            try
            {
                var Polygons = await _polygonMapSupervisor.GetPolygonsByListOfIdsAsync(ids);

                if (Polygons == null)
                {
                    return(NotFound());
                }
                return(Polygons.ToList());
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }