示例#1
0
        public void Add(SNote note)
        {
            var dNote = SNote.StoD(note);

            NoteRepository.Add(dNote);
            note.Id = dNote.Id;
        }
示例#2
0
        public NoteCreate BuildNoteCreate(SNote note)
        {
            var noteCreate = new NoteCreate
            {
                Note           = note,
                BookSelectList = new SelectList(BookRepository.GetAll(), "Id", "Title", note.BookId)
            };

            return(noteCreate);
        }
示例#3
0
 public void Update(SNote entity)
 {
     NoteRepository.Update(SNote.StoD(entity));
 }
示例#4
0
        public SNote GetSingle(Guid id)
        {
            var note = NoteRepository.GetSingle(id);

            return(SNote.DtoS(note));
        }