public void Delete(int id) { bonuszContext context = new bonuszContext(); var törlendő = (from x in context.Gondolas where x.Id == id select x).FirstOrDefault(); context.Remove(törlendő); context.SaveChanges(); }
public void Post([FromBody] Gondola kText) { bonuszContext context = new bonuszContext(); context.Gondolas.Add(kText); // Gondola uj = new Gondola(); // uj.Gondolat = bontott[1].ToString(); // uj.Ido = DateTime.Now; context.SaveChanges(); }