public void TestMethod1() { IPersonDataStore store = new PersonDataStore(new ShootingRangeEntities()); Person person = store.FindByFirstName("Dan").First(); person.FirstName = "Faronel"; store.Update(person); }
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)); }