public async Task <HttpResponseMessage> PutHerkomst(ADHerkomst model) { bool validated = await ValidateAgainstSchemeAsync("ADHerkomst"); if (model != null && validated) { db.ADHerkomsts.AddOrUpdate(model); db.SaveChanges(); } return(new HttpResponseMessage(HttpStatusCode.OK)); }
public async Task <HttpResponseMessage> PostHerkomst(ADHerkomst model) { bool validated = await ValidateAgainstSchemeAsync("ADHerkomst"); if (model != null && validated) { db.ADHerkomsts.AddOrUpdate(model); db.SaveChanges(); return(new HttpResponseMessage(HttpStatusCode.OK)); } else { return(Response(HttpStatusCode.BadRequest, "Could not validate request")); } }