/// <summary>
        ///    This loads teh view from the model and implements paging so
        ///    not all rows are returend on 10 at a time
        /// </summary>
        /// <param name="pageNumber"></param>
        /// <returns></returns>
        /// <remarks>
        ///      Date:   24/06/2018
        ///      Author: Stephen McCutcheon
        /// </remarks>
        public ActionResult Index(int?pageNumber)
        {
            using (var apiClient = new MyServersApiClient())
            {
                var authInfo = new AuthInfo
                {
                    Username = Settings.Default.APIUserName,
                    Password = Settings.Default.APIPassword
                };

                //Gets all the Top Level Domains Details
                var topLevelDomains = apiClient.GetAllTLDs(authInfo);


                //Page checks to ensure the page number does not go off the
                //end of pages. Basically if you try and access a page before or after
                //itdefaults back to the first or last page accordingly
                int startPos;
                var viewModels = SetMaxAndMinPagesViewModels(pageNumber, topLevelDomains, out startPos);

                //Set the apprioprate values in the Modl
                foreach (var domain in topLevelDomains.Skip(startPos).Take(10))
                {
                    var domainItem = new DomainItem
                    {
                        DomainId   = domain.TLD,
                        DomainCost = domain.Cost.ToString("C"),
                        MaxPeriod  = domain.MaxPeriod,
                        MinPeriod  = domain.MinPeriod
                    };

                    viewModels.Items.Add(domainItem);
                }

                return(View(viewModels));
            }
        }