public void Update(Directions directions) { using (var context = new ApplicationDbContext()) { context.Entry(directions).State = EntityState.Modified; context.SaveChanges(); } }
public void Add(Directions directions) { using (var context = new ApplicationDbContext()) { context.Direction.Add(directions); context.SaveChanges(); } }