Esempio n. 1
0
 public static void BatchInsert(IList <Mongo_Users> list)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             access.BatchInsert(list);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 2
0
 public static IList <Mongo_Users> SelectPage(SortDefinition <Mongo_Users> order, Expression <Func <Mongo_Users, bool> > filter, int pageIndex, int pageSize, out int rowCount)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             return(access.SelectPage(order, filter, pageIndex, pageSize, out rowCount));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="whereStr">以where 开始</param>
 /// <returns></returns>
 public static IList <Mongo_Users> Select(Expression <Func <Mongo_Users, bool> > filter, SortDefinition <Mongo_Users> order)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             return(access.Select(filter, order));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 4
0
 public static Mongo_Users SelectObject(Expression <Func <Mongo_Users, bool> > filter)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             return(access.SelectObject(filter));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 5
0
 public static int Update(Expression <Func <Mongo_Users, bool> > filter, Mongo_Users obj)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             return(access.Update(filter, obj));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 6
0
 public static string Insert(Mongo_Users obj)
 {
     try
     {
         using (var access = new Mongo_UsersAccess())
         {
             return(access.Insert(obj));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }