public ActionResult Delete(Provider provider)
        {
            try
            {
                this.providerManager.DeleteProvider(provider, HttpContext.User.Identity);
 
                return RedirectToAction("Index");
            }
            catch (Exception exception)
            {
                ViewBag.ErrorMessage =
                    string.Format(
                        "There was an error while trying to process your action.  The message is: {0}",
                        exception.Message);
                if (exception.InnerException != null)
                {
                    ViewBag.InnerErrorMessage = string.Format(
                        "The inner message is: {0}", exception.InnerException.Message);
                }

                return View();
            }
        }
 /// <summary>
 /// GET Create action - returns the Create view used to enter provider information.
 /// </summary>
 /// <param name="facilityid">
 /// The id of the facility that this provider works for.
 /// </param>
 /// <returns>
 /// The Create view.
 /// </returns>
 public ActionResult Create(int facilityid)
 {
     var accountid = Kernel.Get<Accounts>().GetAccountByIdentity(HttpContext.User.Identity).Id;
     var provider = new Provider { AccountId = accountid, FacilityId = facilityid };
     return View(provider);
 }