public IEnumerable <Historial> Get() { using (HistorialDBEntities db = new HistorialDBEntities()) { return(db.Historial.ToList()); } }
public void Insert(string record) { Historial _historial = new Historial(); _historial.Valor = record; using (HistorialDBEntities db = new HistorialDBEntities()) { db.Historial.Add(_historial); db.SaveChanges(); } }