Advertisement
Guest User

Untitled

a guest
Apr 14th, 2022
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. public class temperature
  2. {
  3.     private WeatherContext context;
  4.  
  5.     public temperature(WeatherContext cont)
  6.     {
  7.         context = cont;
  8.     }
  9.  
  10.     public List<temperature> GetAll()
  11.     {
  12.         return context.temperature.ToList();
  13.     }
  14.  
  15.     public List<temperature> GetByID (int id)
  16.     {
  17.         var tem = context.temperature.Where(t => t.ID == id).ToList<temperature>();
  18.         return tem;
  19.     }
  20.  
  21. //--
  22.  
  23. public class ConnectionClass
  24. {
  25.     private WeatherContext Context;
  26.     internal temperature tmp;
  27.     public ConnectionClass()
  28.     {
  29.         context = new WeatherContext();
  30.         tmp = new temperature(Context);
  31.  
  32.     }
  33.  
  34.  
  35. //--
  36.  
  37. public partial class MainWindow : Window
  38. {
  39.     private ConnectionClass cc = new ConnectionClass();
  40.     private WeatherContext context;
  41.     public MainWindow()
  42.     {
  43.         InitializeComponent();
  44.     }
  45.  
  46. //--
  47.  
  48. public class LineChart
  49. {
  50.  
  51. }
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement