这是一个使用razor视图引擎的vb.net MVC3应用程序..下面是项目的代码片段,处理我需要的特别好但是多余的..在同一个控制器中的含义我大约位于6不同功能的时间...我想做的是将它分解为一个单独的功能,只需让该功能返回所需的...任何想法???
ViewBag.tue = _z.CDdownsAllClasses(ACD.Tue, ACD.Tue, courses, 2, id)
ViewBag.wed = _z.CDdownsAllClasses(ACD.Wed, ACD.Wed, courses, 2, id)
ViewBag.thur = _z.CDdownsAllClasses(ACD.Thur, ACD.Thur, courses, 2, id)
ViewBag.fri = _z.CDdownsAllClasses(ACD.Fri, ACD.Fri, courses, 2, id)
ViewBag.tue1 = _z.CDdowns(ACD.Tue, ACD.Tue, courses, 2, id)
ViewBag.tue2 = _z.CDdowns(ACD.Tue, ACD.Tue, courses, 2, id)
ViewBag.wed1 = _z.CDdowns(ACD.Wed, ACD.Wed, courses, 2, id)
ViewBag.wed2 = _z.CDdowns(ACD.Wed, ACD.Wed, courses, 2, id)
ViewBag.thur1 = _z.CDdowns(ACD.Thur, ACD.Thur, courses, 2, id)
ViewBag.thur2 = _z.CDdowns(ACD.Thur, ACD.Thur, courses, 2, id)
ViewBag.fri1 = _z.CDdowns(ACD.Fri, ACD.Fri, courses, 2, id)
ViewBag.fri2 = _z.CDdowns(ACD.Fri, ACD.Fri, courses, 2, id)
ViewBag.tue_multi = _z.CDdowns(ACD.Tue, ACD.Wed, courses, 2, id)
ViewBag.wed_multi = _z.CDdowns(ACD.Wed, ACD.Thur, courses, 2, id)
ViewBag.thu_multi = _z.CDdowns(ACD.Thur, ACD.Fri, courses, 2, id)
ViewBag.tue_multi2 = _z.CDdowns(ACD.Tue, ACD.Wed, courses, 2, id)
ViewBag.wed_multi2 = _z.CDdowns(ACD.Wed, ACD.Thur, courses, 2, id)
ViewBag.thu_multi2 = _z.CDdowns(ACD.Thur, ACD.Fri, courses, 2, id)
ViewBag.four_day = _z.CDdowns(ACD.Tue, ACD.Fri, courses, 2, id)