/// <summary> /// 查询单条 返回实体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="fun"></param> /// <returns></returns> public static Camera Single(Expression <Func <Camera, bool> > fun) { using (DCCarManagementDataContext db = new DCCarManagementDataContext()) { try { return(LinQBaseDao.Single <Camera>(db, fun)); } catch { return(null); } finally { db.Connection.Close(); } } }
/// <summary> /// 查询单条 返回实体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="fun"></param> /// <returns></returns> public static UserInfo Single(Expression <Func <UserInfo, bool> > fun) { return(LinQBaseDao.Single <UserInfo>(new DCCarManagementDataContext(), fun)); }
/// <summary> /// 查询单条 返回实体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="fun"></param> /// <returns></returns> public static View_FVN_Driveway_Position Single(Expression <Func <View_FVN_Driveway_Position, bool> > fun) { return(LinQBaseDao.Single <View_FVN_Driveway_Position>(new DCCarManagementDataContext(), fun)); }
/// <summary> /// 查询单条 返回实体 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="fun"></param> /// <returns></returns> public static Driveway Single(Expression <Func <Driveway, bool> > fun) { return(LinQBaseDao.Single <Driveway>(new DCCarManagementDataContext(), fun)); }