コード例 #1
0
        public ActionResult GetAll()
        {
            List <WorkerViewModel> workers = new List <WorkerViewModel>();

            foreach (var worker in repo.GetAll())
            {
                string name = repo.GetNameCompanyById(worker.CompanyId);
                workers.Add(CopyToViewModel(worker, name));
            }

            return(View(workers));
        }