/// <summary> /// Deletes a short URL from the data context. /// </summary> /// <param name="shortUrl">The short URL to be deleted.</param> public void DeleteShortUrl(ShortURL shortUrl) { _entityContainer.ShortURLs.Remove(shortUrl); _entityContainer.SaveChanges(); }
/// <summary> /// Adds a short URL to the data context. /// </summary> /// <param name="shortUrl">The short URL to be added.</param> public void AddShortUrl(ShortURL shortUrl) { _entityContainer.ShortURLs.Add(shortUrl); _entityContainer.SaveChanges(); }