コード例 #1
0
        public virtual IList <TEntity> GetList(IEnumerable <int> ids)
        {
            QueryComplete query = Query.In("_id", BsonArray.Create(ids));

            return(MongoAccessor.GetCollection <TEntity>().FindAs <TEntity>(query).ToList());
        }
コード例 #2
0
 public virtual TEntity Get(object id)
 {
     return(MongoAccessor.GetCollection <TEntity>().FindOneByIdAs <TEntity>(BsonValue.Create(id)));
 }