public IHttpActionResult PostCalcConfiguration(CalcConfiguration calcConfiguration)
        {
            //if (!ModelState.IsValid)
            //{
            //    return BadRequest(ModelState);
            //}
            calcConfiguration.UpdateDate = DateTime.Now;
            calcConfiguration.User = HttpContext.Current.User.Identity.Name.ToString();
            db.CalcConfiguration.Add(calcConfiguration);
            db.SaveChanges();

            return CreatedAtRoute("DefaultApi", new { id = calcConfiguration.ID }, calcConfiguration);
        }
        public IHttpActionResult PutCalcConfiguration(int id, CalcConfiguration calcConfiguration)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != calcConfiguration.ID)
            {
                return BadRequest();
            }

            calcConfiguration.UpdateDate = DateTime.Now;
            calcConfiguration.User = HttpContext.Current.User.Identity.Name.ToString();

            db.Entry(calcConfiguration).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!CalcConfigurationExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }