public async Task<IHttpActionResult> PostWaterQualityMonitoring(WaterQualityMonitoring waterQualityMonitoring)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (waterQualityMonitoring.ProjectBase != null)
            {
                waterQualityMonitoring.ProjectBase.DateReported = DateTime.Now;
            }
            db.WaterQualityMonitorings.Add(waterQualityMonitoring);

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateException)
            {
                if (WaterQualityMonitoringExists(waterQualityMonitoring.WaterQualityMonitoringId))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

            return CreatedAtRoute("DefaultApi", new { id = waterQualityMonitoring.WaterQualityMonitoringId }, waterQualityMonitoring);
        }
        public async Task<IHttpActionResult> PutWaterQualityMonitoring(int id, WaterQualityMonitoring waterQualityMonitoring)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != waterQualityMonitoring.WaterQualityMonitoringId)
            {
                return BadRequest();
            }

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

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!WaterQualityMonitoringExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }