public IHttpActionResult Put(int id, Chirps cheep) { _adapter.UpdateChirp(id, cheep); return Ok(); }
public void UpdateChirp(int id, Chirps Cheep) { ApplicationDbContext Db = new ApplicationDbContext(); Db.SaveChanges(); }
public IHttpActionResult Post(Chirps cheeps) { _adapter.CreateChirp(cheeps); return Ok(); }
public void CreateChirp(Chirps Cheep) { ApplicationDbContext Db = new ApplicationDbContext(); Db.Cheeps.Add(Cheep); Db.SaveChanges(); }