public ActionResult Index() { var boCollection = _Service.GetAll().OrderBy(x => x.Name); var vmCollection = new List <AlbumViewModel>(); var count = 0; foreach (var item in boCollection) { var vm = new AlbumViewModel(); vm.MapToModel(item); vm.OrderNumber = (++count).ToString(); vmCollection.Add(vm); } ViewBag.Title = "专辑"; return(View(vmCollection)); }