/// <summary>
        /// This add a new To Do entry into the context and then calls the client function
        /// </summary>
        /// <param name="newToDo">A To Do object</param>
        /// <returns>Bool if it was successful</returns>
        public bool Add(ToDo newToDo)
        {
            var result = false;

            try
            {
                using (var context = new ToDoContext())
                {
                    var toDo = context.ToDos.Create();
                    toDo.Title = newToDo.Title;
                    toDo.Description = newToDo.Description;
                    toDo.CompleteDate = newToDo.CompleteDate;

                    context.ToDos.Add(toDo);
                    context.SaveChanges();

                    Clients.All.toDoCreated(toDo);
                    result = true;
                }
            }
            catch (Exception)
            {
                Clients.Caller.raiseError("Unable to create a new ToDo Entry.");
            }

            return result;
        }
        /// <summary>
        /// This updates a To Do entry into the context and then calls the client function
        /// </summary>
        /// <param name="updatedToDo">A To Do object</param>
        /// <returns>Bool if it was successful</returns>
        public bool Update(ToDo updatedToDo)
        {
            var result = false;

            try
            {
                using (var context = new ToDoContext())
                {
                    var toDo = context.ToDos.SingleOrDefault(x => x.Id == updatedToDo.Id);

                    if (toDo != null)
                    {
                        toDo.Title = updatedToDo.Title;
                        toDo.Description = updatedToDo.Description;
                        toDo.CompleteDate = updatedToDo.CompleteDate;

                        context.ToDos.Add(toDo);
                        context.SaveChanges();

                        Clients.All.toDoUpdated(toDo);
                        result = true;
                    }
                }
            }
            catch (Exception)
            {
                Clients.Caller.raiseError("Unable to update ToDo Entry.");
            }

            return result;
        }