public Puzzle Post([FromBody] Puzzle puzzle) { var rc = PuzzleRepository.Add(puzzle); PuzzleRepository.SaveChanges(); return(rc); }
public Puzzle AddWord(int id, [FromBody] PuzzleWord word) { var rc = PuzzleRepository.AddWord(id, word.Word); PuzzleRepository.SaveChanges(); return(rc); }
public Puzzle DeleteWord(int id, int wordId) { var rc = PuzzleRepository.DeleteWord(id, wordId); PuzzleRepository.SaveChanges(); return(rc); }
public Puzzle Put([FromBody] Puzzle puzzle) { var rc = PuzzleRepository.Update(puzzle.Id, puzzle); PuzzleRepository.SaveChanges(); return(rc); }
public IEnumerable <Puzzle> Delete(int id) { PuzzleRepository.Delete(id); PuzzleRepository.SaveChanges(); return(PuzzleRepository.GetAll()); }