Example #1
0
 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));
 }
Example #2
0
 public async Task <IReadOnlyCollection <YobaNote> > GetNotes(CancellationToken cancel = default)
 {
     using (var db = _factory.Create())
         return(await YobaNotes(db).ToListAsync(cancel));
 }