Notes
1using System;
2using System.Collections.Generic;
3using System.Collections.ObjectModel;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7
8
9namespace ViewModel.Services
10{
11public static class Transfers
12{
13public static List<NoteDTO> TransferNoteVMToNoteDTO(
14ObservableCollection<NoteViewModel> notesViewModel)
15{
16var notesDTO = new List<NoteDTO>();
17foreach(NoteViewModel note in notesViewModel)
18{
19var noteDTO = new NoteDTO();
20noteDTO.Title = note.Title;
21noteDTO.Text = note.Text;
22noteDTO.Id = note.Id;
23notesDTO.Add(noteDTO);
24}
25return notesDTO;
26}
27}
28}
29