// Add new gradedwork
 public GradedWorkAdd AddGradedWork(GradedWorkAdd gradedwork)
 {
     // Map from DTO object to domain (POCO) object
         var e = ds.GradedWorks.Add(Mapper.Map<ICTGWS.Models.GradedWork>(gradedwork));
         ds.SaveChanges();
         // Map to DTO object
         return Mapper.Map<GradedWorkAdd>(e);
 }
        public HttpResponseMessage PostGW(GradedWorkAdd gradedwork)
        {
            if (ModelState.IsValid)
            {
                // Add the new item
                var c = r.AddGradedWork(gradedwork);

                HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.Created, gradedwork);
                response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = gradedwork.GradedWorkId }));
                return response;
            }
            else
            {
                return Request.CreateResponse(HttpStatusCode.BadRequest);
            }
        }