public Task CreateProfile(YobaProfile p, CancellationToken cancel = default) { using var db = _factory.Create(); return(db.Profiles.InsertAsync(() => new Profile { Id = p.Id, Loisy = p.Loisy, Slivi = p.Slivi, Zashkvory = p.Zashkvory, CanVote = p.CanVote, MainName = p.MainName, IsTransport = false, }, cancel)); }
public async Task <IReadOnlyCollection <YobaNote> > GetNotes(CancellationToken cancel = default) { using (var db = _factory.Create()) return(await YobaNotes(db).ToListAsync(cancel)); }