public IHttpActionResult PutCalenderMaster(long id, CalenderMaster calenderMaster)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != calenderMaster.datekey)
            {
                return BadRequest();
            }

            db.InsertOrUpdate(calenderMaster);

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

            return StatusCode(HttpStatusCode.NoContent);
        }
        public IHttpActionResult PostCalenderMaster(CalenderMaster calenderMaster)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.InsertOrUpdate(calenderMaster);
            db.Save();

            return CreatedAtRoute("DefaultApi", new { id = calenderMaster.datekey }, calenderMaster);
        }