public async Task <IActionResult> GetMyRestaurantsAsync()
        {
            var identityName = (User.Identity as ClaimsIdentity).Claims.FirstOrDefault(en => en.Type == ClaimTypes.NameIdentifier)?.Value;

            if (identityName == null || !Guid.TryParse(identityName, out var currentUserId))
            {
                return(Unauthorized());
            }
            var currentUser = await userRepository.FindByUserIdAsync(new UserId(currentUserId));

            var queryResult = await queryDispatcher.PostAsync <RestAdminMyRestaurantsQuery, ICollection <RestaurantViewModel> >(new RestAdminMyRestaurantsQuery(), currentUser);

            return(ResultHelper.HandleResult(queryResult, failureMessageService));
        }
        public async Task <IActionResult> SearchForRestaurantAsync(string search)
        {
            var queryResult = await queryDispatcher.PostAsync <OrderSearchForRestaurantsQuery, ICollection <RestaurantViewModel> >(new OrderSearchForRestaurantsQuery(search), null);

            return(ResultHelper.HandleResult(queryResult, failureMessageService));
        }