public ActionResult Create([Bind(Include = "boardID,Title")] boards boards) { if (ModelState.IsValid) { db.board.Add(boards); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(boards)); }
public ActionResult Create([Bind(Include = "ItemNamesID,ItemNameTitle")] ItemNames itemNames, int?id) { if (ModelState.IsValid) { db.board.Find(id).Items.Add(itemNames); db.itemnames.Add(itemNames); db.SaveChanges(); return(RedirectToAction("Details", "boards", new { id = id })); } return(View(itemNames)); }
public HttpResponseMessage Delete(int id) { KanbanDB.subcardlist.Remove(KanbanDB.subcardlist.FirstOrDefault(x => x.Id == id)); return(ToJson(KanbanDB.SaveChanges())); }
public HttpResponseMessage Put(int id, [FromBody] subcardlist value) { KanbanDB.Entry(value).State = EntityState.Modified; return(ToJson(KanbanDB.SaveChanges())); }
public HttpResponseMessage Post([FromBody] subcardlist value) { KanbanDB.subcardlist.Add(value); return(ToJson(KanbanDB.SaveChanges())); }
public HttpResponseMessage Post([FromBody] cards value) { KanbanDB.cards.Add(value); return(ToJson(KanbanDB.SaveChanges())); }