Пример #1
0
 public void Save(NoteDTO dto)
 {
     using (var connection = new SqlConnection(_ConnectionString))
     {
         connection.Update(dto);
     }
 }
Пример #2
0
 public void Delete(NoteDTO dto)
 {
     using (var connection = new SqlConnection(_ConnectionString))
     {
         connection.Delete(dto);
     }
 }
Пример #3
0
        public void Add(NoteDTO dto)
        {
            dto.UserId = User.Id;

            using (var connection = new SqlConnection(_ConnectionString))
            {
                connection.Insert(dto);
            }
        }
 public void Add(NoteDTO dto)
 {
     File.WriteAllText(User.Folder + "\\" + GetMaxId() + ".nt", dto.Name + '¨'
                       + dto.Content + '¨' + dto.FolderId + '¨' + User.Id);
 }
 public void Delete(NoteDTO dto)
 {
     File.Delete(User.Folder + "\\" + dto.Id + ".nt");
 }
 public void Save(NoteDTO dto)
 {
     File.WriteAllText(User.Folder + "\\" + dto.Id + ".nt", dto.Name + '¨'
                       + dto.Content + '¨' + dto.FolderId + '¨' + User.Id);
 }