Beispiel #1
0
        public static IEnumerable <ElemiMunka> GetPage(ODataQueryOptions <ElemiMunka> queryOptions)
        {
            using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
            {
                mirtuszDC.Connection.Open();
                if (queryOptions.Filter != null)
                {
                    var micsoda = mirtuszDC.VELEMIMUNKAINMLISTs.Select(dbe => new ElemiMunka()
                    {
                        AZONOSITO  = dbe.AZONOSITO,
                        CIM        = dbe.CIM,
                        MAIN       = dbe.MAIN,
                        KESZULTSEG = dbe.KESZULTSEG,
                        PRIORITAS  = dbe.PRIORITAS
                    });
                    var a = queryOptions.ApplyTo(micsoda);
                }

                return(mirtuszDC.VELEMIMUNKAINMLISTs.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).Select(dbe => new ElemiMunka()
                {
                    AZONOSITO = dbe.AZONOSITO,
                    CIM = dbe.CIM,
                    MAIN = dbe.MAIN,
                    KESZULTSEG = dbe.KESZULTSEG,
                    PRIORITAS = dbe.PRIORITAS
                }).ToArray());
            }
        }
 internal static IEnumerable<VELEMIMUNKAINMLIST> GetDbPage(ODataQueryOptions<VELEMIMUNKAINMLIST> queryOptions)
 {
     using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
     {
         mirtuszDC.Connection.Open();
         if (queryOptions.Filter != null)
         {
             IQueryable query = queryOptions.ApplyTo(mirtuszDC.VELEMIMUNKAINMLISTs);
             var a = query.Provider.Execute< IEnumerable<VELEMIMUNKAINMLIST>>(query.Expression);
             return a.ToArray();
     //                    return a.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).ToArray();
         }
         return mirtuszDC.VELEMIMUNKAINMLISTs.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).ToArray();
     }
 }
        internal static IEnumerable <VELEMIMUNKAINMLIST> GetDbPage(ODataQueryOptions <VELEMIMUNKAINMLIST> queryOptions)
        {
            using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
            {
                mirtuszDC.Connection.Open();
                if (queryOptions.Filter != null)
                {
                    IQueryable query = queryOptions.ApplyTo(mirtuszDC.VELEMIMUNKAINMLISTs);
                    var        a     = query.Provider.Execute <IEnumerable <VELEMIMUNKAINMLIST> >(query.Expression);
                    return(a.ToArray());
//                    return a.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).ToArray();
                }
                return(mirtuszDC.VELEMIMUNKAINMLISTs.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).ToArray());
            }
        }
Beispiel #4
0
 internal static IEnumerable <ElemiMunka> GetPage(int skip, int top)
 {
     using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
     {
         mirtuszDC.Connection.Open();
         return(mirtuszDC.VELEMIMUNKAINMLISTs.Skip(skip).Take(top).Select(dbe => new ElemiMunka()
         {
             AZONOSITO = dbe.AZONOSITO,
             CIM = dbe.CIM,
             MAIN = dbe.MAIN,
             KESZULTSEG = dbe.KESZULTSEG,
             PRIORITAS = dbe.PRIORITAS
         }).ToArray());
     }
 }
 internal static int GetCount(ODataQueryOptions<VELEMIMUNKAINMLIST> queryOptions)
 {
     using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
     {
         mirtuszDC.Connection.Open();
         if (queryOptions.Filter != null)
         {
             ODataQuerySettings settings = new ODataQuerySettings()
             {
                 PageSize = 1000000
             };
             IQueryable query = queryOptions.ApplyTo(mirtuszDC.VELEMIMUNKAINMLISTs, settings);
             return query.Cast<VELEMIMUNKAINMLIST>().Count();
         }
         return mirtuszDC.VELEMIMUNKAINMLISTs.Count();
     }
 }
 internal static int GetCount(ODataQueryOptions <VELEMIMUNKAINMLIST> queryOptions)
 {
     using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
     {
         mirtuszDC.Connection.Open();
         if (queryOptions.Filter != null)
         {
             ODataQuerySettings settings = new ODataQuerySettings()
             {
                 PageSize = 1000000
             };
             IQueryable query = queryOptions.ApplyTo(mirtuszDC.VELEMIMUNKAINMLISTs, settings);
             return(query.Cast <VELEMIMUNKAINMLIST>().Count());
         }
         return(mirtuszDC.VELEMIMUNKAINMLISTs.Count());
     }
 }
 internal static IEnumerable<ElemiMunka> GetPage(int skip, int top)
 {
     using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
     {
         mirtuszDC.Connection.Open();
         return mirtuszDC.VELEMIMUNKAINMLISTs.Skip(skip).Take(top).Select(dbe => new ElemiMunka()
         {
             AZONOSITO = dbe.AZONOSITO,
             CIM = dbe.CIM,
             MAIN = dbe.MAIN,
             KESZULTSEG = dbe.KESZULTSEG,
             PRIORITAS = dbe.PRIORITAS
         }).ToArray();
     }
 }
        public static IEnumerable<ElemiMunka> GetPage(ODataQueryOptions<ElemiMunka> queryOptions)
        {
            using (MIRTUSZContext.MIRTUSZDataContext mirtuszDC = new MIRTUSZContext.MIRTUSZDataContext())
            {
                mirtuszDC.Connection.Open();
                if (queryOptions.Filter != null)
                {
                    var micsoda = mirtuszDC.VELEMIMUNKAINMLISTs.Select(dbe => new ElemiMunka()
                    {
                        AZONOSITO = dbe.AZONOSITO,
                        CIM = dbe.CIM,
                        MAIN = dbe.MAIN,
                        KESZULTSEG = dbe.KESZULTSEG,
                        PRIORITAS = dbe.PRIORITAS
                    });
                    var a = queryOptions.ApplyTo(micsoda);

                }

                return mirtuszDC.VELEMIMUNKAINMLISTs.Skip(queryOptions.Skip == null ? 0 : queryOptions.Skip.Value).Take(queryOptions.Top.Value).Select(dbe => new ElemiMunka()
                {
                    AZONOSITO = dbe.AZONOSITO,
                    CIM = dbe.CIM,
                    MAIN = dbe.MAIN,
                    KESZULTSEG = dbe.KESZULTSEG,
                    PRIORITAS = dbe.PRIORITAS
                }).ToArray();
            }
        }