public ActionResult CreateChannelIndex(int?id) { ChannelGroup model = null; if (id.HasValue) { model = bll.GetObjectById(x => x.ID == id.Value); return(View("CreateChannel", model)); } else { model = new ChannelGroup(); } return(View("CreateChannel", model)); }