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(); }
public List <MStatement> GetAllStatement(MCaptor c) { return(MStatement.GetAllByCaptorId(ctx, c.CaptorId)); }
public List <MStatement> GetAllStatementByDate(MCaptor c, DateTime start, DateTime end) { return(MStatement.GetByDate(ctx, c.CaptorId, start, end)); }
public List <MCaptor> GetCaptorList() { return(MCaptor.GetAll(ctx)); }