public JsonResult EditChangelog([FromBody] ChangelogEditRequest changelog) { using (var context = new DatabaseController(Context, Configuration)) { context.EditChangelog(changelog); } return(Json(new object())); }
public JsonResult EditChangelog([FromBody] ChangelogEditRequest changelog) { using (var context = new ChangelogContext(Context, Config)) { context.EditChangelog(changelog); } return(Json(new object())); }
internal void EditChangelog(ChangelogEditRequest changelog) { var current = Context.Changelogs.FirstOrDefault(x => x.Id == changelog.Id); current.LogDetails = changelog.Content; Context.Attach(current); Context.Update(current); Context.SaveChanges(); }