// GET: SystemAdmin/StoreFrontSysAdmin/Create public ActionResult Create(int?clientId) { if (GStoreDb.Clients.IsEmpty()) { AddUserMessage("No clients in database.", "There are no clients in the database. To Create a Store Front you need to create a Client first.", UserMessageType.Warning); return(RedirectToAction("Create", "ClientSysAdmin")); } Client client = null; if (clientId.HasValue) { client = GStoreDb.Clients.FindById(clientId.Value); } StoreFront model = GStoreDb.StoreFronts.Create(); model.SetDefaultsForNew(client); this.BreadCrumbsFunc = htmlHelper => this.StoreFrontBreadcrumb(htmlHelper, clientId, model, false); return(View(model)); }