Пример #1
0
        public ActionResult Create([Bind(Include = "boardID,Title")] boards boards)
        {
            if (ModelState.IsValid)
            {
                db.board.Add(boards);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(boards));
        }
Пример #2
0
        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));
        }
Пример #3
0
 public HttpResponseMessage Delete(int id)
 {
     KanbanDB.subcardlist.Remove(KanbanDB.subcardlist.FirstOrDefault(x => x.Id == id));
     return(ToJson(KanbanDB.SaveChanges()));
 }
Пример #4
0
 public HttpResponseMessage Put(int id, [FromBody] subcardlist value)
 {
     KanbanDB.Entry(value).State = EntityState.Modified;
     return(ToJson(KanbanDB.SaveChanges()));
 }
Пример #5
0
 public HttpResponseMessage Post([FromBody] subcardlist value)
 {
     KanbanDB.subcardlist.Add(value);
     return(ToJson(KanbanDB.SaveChanges()));
 }
Пример #6
0
 public HttpResponseMessage Post([FromBody] cards value)
 {
     KanbanDB.cards.Add(value);
     return(ToJson(KanbanDB.SaveChanges()));
 }