static void Mongo_DB_Isert() { MongoRepositoryDal <transaction> mongoRepository = new MongoRepositoryDal <transaction>("transactions"); string sql = "select tarih,block_id,tx,aktif from transactions (nolock) "; IQueryable <transaction> data = repositoryDal.GetQuery <transaction>(sql); foreach (var item in data) { mongoRepository.Create(item); Console.WriteLine(item.tx); } }
static void Main(string[] args) { MongoRepositoryDal <transaction> mongoRepository = new MongoRepositoryDal <transaction>("transactions"); //Console.WriteLine(mongoRepository.GetQuery().FirstOrDefault(p => p.tx == "999e1c837c76a1b7fbb7e57baf87b309960f5ffefbf2a9b95dd890602272f644").Id); //Mongo_DB_Isert(); var result = mongoRepository.GetQuery().ToList(); foreach (var item in result) { Console.WriteLine(item.Id + "-->" + item.tx); } Console.ReadKey(); }