Exemple #1
0
        static void Main(string[] args)
        {
            ClearDb();

            projet4Entities ctx = new projet4Entities();
            MCaptor         mc  = new MCaptor();

            mc.Serial_number = "482";
            mc.Localisation  = "ici";
            mc.Description   = "plop";
            captor cpt = mc.ConvertToDao();

            ctx.captor.Add(cpt);
            ctx.SaveChanges();
            Console.WriteLine("capteur : id {0} ajouté !", cpt.captorId);
            Console.ReadLine();
        }
Exemple #2
0
 public List <MStatement> GetAllStatement(MCaptor c)
 {
     return(MStatement.GetAllByCaptorId(ctx, c.CaptorId));
 }
Exemple #3
0
 public List <MStatement> GetAllStatementByDate(MCaptor c, DateTime start, DateTime end)
 {
     return(MStatement.GetByDate(ctx, c.CaptorId, start, end));
 }
Exemple #4
0
 public List <MCaptor> GetCaptorList()
 {
     return(MCaptor.GetAll(ctx));
 }