public async Task ApiCallAsync(Integratie2018Context context) { try { client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json") { CharSet = "utf-8" }); StringContent content = new StringContent("{" + GetSince() + "}", System.Text.Encoding.UTF8, "application/json"); Latest = DateTime.Now; context.Entry(this).State = EntityState.Modified; context.SaveChanges(); content.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json") { CharSet = "utf-8" }; content.Headers.Add("X-API-Key", "aEN3K6VJPEoh3sMp9ZVA73kkr"); HttpResponseMessage response = await client.PostAsync("http://kdg.textgain.com/query", content); string responseString = await response.Content.ReadAsStringAsync(); responseString.ToString(); AddBerichten(responseString, context); } catch (Exception e) { e.ToString(); } }
public void UpdateFaq(FAQ faq) { if (ReadFaq(faq.ID) == null) { return; } ctx.Entry(faq).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); }
public void UpdateGebruiker(Gebruiker gebruiker) { ctx.Entry(gebruiker).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); }
public void UpdateAlert(Alert alert) { ctx.Entry(alert).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); }
public void UpdateBericht(Bericht bericht) { ctx.Entry(bericht).State = System.Data.Entity.EntityState.Modified; ctx.SaveChanges(); }