コード例 #1
0
        public ActionResult AddCar(int personId)
        {
            var repo   = new PeopleCarsRepository(Properties.Settings.Default.ConStr);
            var person = repo.GetById(personId);

            if (person == null)
            {
                return(RedirectToAction("Index"));
            }
            return(View(person));
        }
コード例 #2
0
        public Person GetPersonById(int id)
        {
            var repo = new PeopleCarsRepository(_connectionString);

            return(repo.GetById(id));
        }