public ActionResult <List <SavingGoal> > Put([FromRoute] int id, [FromBody] NewNameViewModel NewName) { var ChangedGoal = this.db.SavingGoal.First(SavingGoal => SavingGoal.Id == id); ChangedGoal.Title = NewName.NewName; this.db.SaveChanges(); var results = this.db.SavingGoal.OrderBy(goal => goal.Id); return(results.ToList()); }
public MainWindow() { InitializeComponent(); DataContext = new NewNameViewModel(); }