Example #1
0
        public async Task <Note> CreateAsync(Note note)
        {
            var dateTime = _dateWrapper.GetCurrentDateTime();

            var noteToPersist = new Note
            {
                Id                   = _guidWrapper.GetNew(),
                Text                 = note.Text,
                CreationDate         = dateTime,
                LastModificationDate = dateTime
            };

            return(await _repository.CreateAsync(noteToPersist));
        }