Beispiel #1
0
        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));
            }
        }
Beispiel #2
0
        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));
            }
        }