Example #1
0
        public HttpResponseMessage PutPerioden(ADPerioden model)
        {
            if (model != null)
            {
                db.ADPeriodens.AddOrUpdate(model);
                db.SaveChanges();
            }

            return(new HttpResponseMessage(HttpStatusCode.OK));
        }
Example #2
0
 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"));
     }
 }