public ActionResult MarketCustomers(int id) { if (!caSession.AuthoriseSession()) { return(Redirect((string)Session["ErrorUrl"])); } var model = new MarketCustomersViewModel() { MarketId = id }; if (id > 0) { ViewBag.MarketName = _marketServices.GetMarketById(id).Name; model = _marketServices.GetMarketCustomersById(id, CurrentTenantId, null); model.MarketCustomerEntries = Newtonsoft.Json.JsonConvert.SerializeObject(model.SelectedCustomers); } return(View(model)); }