示例#1
0
        /// <summary>
        /// Adds a note and sends changes to server
        /// </summary>
        /// <param name="text"></param>
        public void AddNote(string text)
        {
            var note = new Note
            {
                ID = this.GetNewNoteId(),
                Text = text,
                TimeCreated = DateTime.Now
            };

            this.Notes.Add(note);

            this.SaveChanges();
        }
示例#2
0
        /// <summary>
        /// Adds a note and sends changes to server
        /// </summary>
        /// <param name="text"></param>
        public void AddNote(string text)
        {
            var note = new Note
            {
                ID = Guid.NewGuid().ToString(),
                Text = text,
                TimeCreated = DateTime.Now
            };

            this.Notes.Add(note);

            this.SaveChanges();
        }