Exemplo n.º 1
0
 public static List <Product> GetProducts()
 {
     try
     {
         using (var context = new ParallaxContext())
         {
             return(context.Products.ToList());
         }
     }
     catch
     {
         return(null);
     }
 }
Exemplo n.º 2
0
 public static List <Category> GetCategories()
 {
     try
     {
         using (var context = new ParallaxContext())
         {
             return(context.Categories.ToList());
         }
     }
     catch
     {
         return(null);
     }
 }
Exemplo n.º 3
0
 public static long?GetCheckSUMItems()
 {
     try
     {
         using (ParallaxContext context = new ParallaxContext())
         {
             long checksum = context.Checksums.FromSql("CHECKSUM TABLE Items").AsNoTracking().FirstOrDefault().Hash;
             return(checksum);
         }
     }
     catch
     {
         return(null);
     }
 }
Exemplo n.º 4
0
 public static List <Direction> GetDirections()
 {
     try
     {
         using (var context = new ParallaxContext())
         {
             return(context.Directions.ToList());
         }
     }
     catch (Exception e)
     {
         string f = e.Message;
         return(null);
     }
 }