/// <summary> /// Adds a given headline to the context. /// </summary> /// <param name="model">The <c>HeadlineModel</c> to add.</param> public void AddHeadline(HeadlineModel model) { context.HeadLines.Add(model); }
/// <summary> /// Updates the info about a Headline entry in the database. /// </summary> /// <param name="entity">The <c>HeadlineModel</c> to be updated.</param> public void Update(HeadlineModel entity) { context.Entry(entity).State = EntityState.Modified; }