public async void NextAction(ITelegramBotClient _bot, MessageEventArgs args) { Random rnd = new Random(); var app = _users.GetById(rnd.Next(0, _users.Count())); PhotoRepository pr = new PhotoRepository(); var photos = pr.GetPhotosByUser(app); var fs = new MemoryStream(); fs.Read(pr.GetPhoto(app.photos[0])); await _bot.SendPhotoAsync(args.Message.Chat.Id, fs); //AppUser temp = _users.GetById(index); //File file = new File(temp.photos[0].GetPhysicalName); //await _bot.SendPhotoAsync(args.Message.Chat.Id,); index++; }