/
AMachine
/
MMDB_Backend
Обзор
Документация
Войти
/
AMachine
/
MMDB_Backend
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
MMDB.Application/NotesService.cs
44 строки
1 KB
AssaultMachine
готово короче
22 май 2025, 17:37
22 май 2025, 17:37
e81a9bb
Код
Авторство
О чём код?
using MMDB.Core.Abstract.Repositories; using MMDB.Core.Abstract.Services; using MMDB.Core.FilterParameters; using MMDB.Core.Models; namespace MMDB.Application; public class NotesService(INotesRepository notesRepository) : INotesService { public async Task<(List<Note> Notes, int Count)> GetAllNotes(NoteParameters parameters) { return await notesRepository.GetAllAsync(parameters); } public async Task<Note?> GetByIdAsync(uint id) { return await notesRepository.GetByIdAsync(id); } public async Task CreateNote(Note note) { await notesRepository.CreateAsync(note); } public async Task<bool> UpdateNote(Note note) { return await notesRepository.UpdateAsync(note); } public async Task<bool> DeleteNote(Note note) { return await notesRepository.DeleteAsync(note); } public IReadOnlyCollection<string> GetNoteTypes() { return notesRepository.GetNoteTypes(); } public IReadOnlyCollection<string> GetNoteSeverities() { return notesRepository.GetNoteSeverities(); } }