public ActionResult Create(DogBLL dog) { try { // TODO: Add insert logic here using (BusinessLogicLayer.ContextBLL ctx = new BusinessLogicLayer.ContextBLL()) { ctx.DogCreate(dog.Name, dog.BreedID, dog.IsSmallBreed, dog.IsDogHairless, dog.Medical, dog.AdoptDate, dog.SurrenderDate); } return(RedirectToAction("Index")); } catch (Exception ex) { Logger.Logger.Log(ex); return(View("Error", ex)); } }