public bool CreateBorough(BoroughCreate model)
        {
            var entity =
                new Borough()
            {
                CreatorId = _userId,
                Name      = model.Name,
                Direction = model.Direction
            };

            using (var ctx = new ApplicationDbContext())
            {
                ctx.Boroughs.Add(entity);
                return(ctx.SaveChanges() == 1);
            }
        }
        public ActionResult Create(BoroughCreate model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var service = CreateBoroughService();

            if (service.CreateBorough(model))
            {
                TempData["SaveResult"] = "Your borough was created. ";
                return(RedirectToAction("Index"));
            }
            ;

            ModelState.AddModelError("", "Borough could not be created.");

            return(View(model));
        }