public IHttpActionResult GetAllMenuForRestaurant(int page = Page, int pagesize = PageSize) { PagedResultsDto menus; menus = UserRole == Enums.RoleType.RestaurantAdmin.ToString() ? _menuFacade.GetAllMenusByRestaurantId(Language, UserId, page, pagesize) : _menuFacade.GetActivatedMenusByWaiterId(Language, UserId, page, pagesize); var data = Mapper.Map <List <MenuModel> >(menus.Data); foreach (var menu in data) { menu.ImageURL = Url.Link("MenuImage", new { menu.RestaurantId, menu.MenuId }); } return(PagedResponse("GetAllMenuForRestaurant", page, pagesize, menus.TotalCount, data)); }