public async Task <IHttpActionResult> Search(Rm request) { try { Tuple <List <ShopSuperAdminViewModel>, int> content = await shopService.SearchAsync(request); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, content); response.Headers.Add("Count", content.Item2.ToString()); return(ResponseMessage(response)); } catch (Exception exception) { Logger.Fatal(exception, "Exception occurred while Searching {TypeName} with Request {Request}", typeof(ShopQueryController).ToString(), request); return(InternalServerError(exception)); } }
public async Task <IHttpActionResult> Dropdown(Rm request) { try { var content = await shopService.GetDropdownListAsync(request); HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, content); return(ResponseMessage(response)); } catch (Exception exception) { Logger.Fatal( exception, "Exception occurred while trying to get Dropdown {TypeName} with Request {Request}", typeof(ShopQueryController).ToString(), request); return(InternalServerError(exception)); } }