public void Save(NoteDTO dto) { using (var connection = new SqlConnection(_ConnectionString)) { connection.Update(dto); } }
public void Delete(NoteDTO dto) { using (var connection = new SqlConnection(_ConnectionString)) { connection.Delete(dto); } }
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); }