Пример #1
0
        // WE NEED TO IMPLEMENT THIS AND SAVE WHAT CURRENT ID WE HAVE GOTTEN TO IN THE JSON. OTHERWISE WHEN YOU RESTART THE PROGRAM THE nextId will be 0!!!!!

        // CONSTRUCTOR ----------------------------------------------------------------------------------------------------------------------------- CONSTRUCTOR
        public BoardService(JsonFileService <Board> bJsonService)
        {
            boardJsonService = bJsonService;

            // RUN THIS ONCE TO SET UP MOCK DATA
            //boardJsonService.SaveJsonObjects(MockKanbanBoards.kanbanBoards);
        }
Пример #2
0
        public UserService(JsonFileService <User> jsonFileUserService)
        {
            JsonFileService = jsonFileUserService;

            // Use this if it's the first time the program is started or there is no Json file yet.
            //Users = MockUsers.GetMockUsers();
            // JsonFileService.SaveJsonObjects(Users);

            // Use this if you want to read from the existing Json file.
            Users = JsonFileService.GetJsonObjects().ToList();
        }