// GET: Contacts
        public ActionResult Index()
        {
            IEnumerable <ContactViewModel> contacts = null;

            var result = _contactsRepo.GetContacts();

            //If success received
            if (result.IsSuccessStatusCode)
            {
                var readTask = result.Content.ReadAsAsync <IList <ContactViewModel> >();
                readTask.Wait();
                contacts = readTask.Result;
            }
            else
            {
                //Error response received
                contacts = Enumerable.Empty <ContactViewModel>();
                ModelState.AddModelError(string.Empty, "Server error try after some time.");
            }

            return(View(contacts));
        }