예제 #1
0
 public async Task <IActionResult> GetBanners([FromBody] BannerGetByMenuIdRequest request)
 {
     try
     {
         BannersGetByMenuIdResponse response = new BannersGetByMenuIdResponse();
         var results = BannersGetByMenuIdRequestValidate.ValidateModel(request);
         if (results.IsValid)
         {
             response = await _menuAppService.BannerGetByMenuId(request);
         }
         else
         {
             response.SetFail(results.Errors.Select(p => p.ToString()));
         }
         return(Json(response));
     }
     catch (Exception e)
     {
         _logger.LogError(e, Common.Common.GetMethodName(), request);
         throw;
     }
 }