Пример #1
0
        public void TestMethod1()
        {
            IPersonDataStore store  = new PersonDataStore(new ShootingRangeEntities());
            Person           person = store.FindByFirstName("Dan").First();

            person.FirstName = "Faronel";
            store.Update(person);
        }
Пример #2
0
        public IActionResult UpdateApplicant(int id, [FromBody] Person p)
        {
            if (id != p.Id)
            {
                return(BadRequest());
            }

            if (_ds.GetById(id) == null)
            {
                return(NotFound());
            }

            Person up = _ds.Update(p);

            return(Ok(up));
        }