public IEnumerable <Puzzle> Get() { IEnumerable <Puzzle> rc = new List <Puzzle>(); try { var localrc = PuzzleRepository.GetAll(); rc = localrc.ToList(); } catch (Exception e) { Logger.LogError(e, string.Empty); // In case of exception return empty List } return(rc); }
public IEnumerable <Puzzle> Delete(int id) { PuzzleRepository.Delete(id); PuzzleRepository.SaveChanges(); return(PuzzleRepository.GetAll()); }