Example #1
0
        public static POCXml Get(int pocId)
        {
            DataContext db = POCDB.POCDBContext();

            // get a typed table to run queries
            Table <POCXml> xmlTable = db.GetTable <POCXml>();

            return((from xml in xmlTable where xml.Xml_Id == pocId select xml).First());
        }
Example #2
0
        public static int Count(int pocId)
        {
            DataContext db = POCDB.POCDBContext();

            // get a typed table to run queries
            Table <POCXml> xmlTable = db.GetTable <POCXml>();

            return(xmlTable.Where(p => p.Xml_Id == pocId).Count());
        }
Example #3
0
        public static List <POCXml> Get()
        {
            DataContext db = POCDB.POCDBContext();

            // get a typed table to run queries
            Table <POCXml> xmlTable = db.GetTable <POCXml>();

            return((from xml in xmlTable
                    orderby xml.Xml_Id
                    select xml).ToList());
        }