public HttpResponseMessage PutPerioden(ADPerioden model) { if (model != null) { db.ADPeriodens.AddOrUpdate(model); db.SaveChanges(); } return(new HttpResponseMessage(HttpStatusCode.OK)); }
public HttpResponseMessage PostPerioden(ADPerioden model) { if (model != null) { db.ADPeriodens.AddOrUpdate(model); db.SaveChanges(); return(Response(HttpStatusCode.OK, "OK")); } else { return(Response(HttpStatusCode.BadRequest, "Incorrect data was provided")); } }