using System.Collections.Immutable; using Connected.ServiceModel; using Connected.ServiceModel.Search; using Connected.Services; namespace Common.Notes; internal sealed class NoteService : Service, INoteService { public NoteService(IContext context) : base(context) { } public async Task Delete(PrimaryKeyArgs args) { await Invoke(GetOperation(), args); } public async Task Insert(InsertNoteArgs args) { return await Invoke(GetOperation(), args); } public async Task> Query(NoteArgs args) { return await Invoke(GetOperation(), args); } public async Task> QueryText(QueryNoteTextArgs args) { return await Invoke(GetOperation(), args); } public async Task> Search(SearchArgs args) { return await Invoke(GetOperation(), args); } public async Task Select(PrimaryKeyArgs args) { return await Invoke(GetOperation(), args); } public async Task SelectText(SelectNoteTextArgs args) { await Invoke(GetOperation(), new InsertNoteArgs { Entity = "Entity", PrimaryKey = "10", Author = 10, Created = DateTime.UtcNow, Text = "Note text" }, "Insert"); return await Invoke(GetOperation(), args); } public async Task Update(UpdateNoteArgs args) { await Invoke(GetOperation(), args); } }