Beispiel #1
0
 public void SaveTracingComment(FrayteTracingComment ftc)
 {
     try
     {
         TracingComment tc;
         if (ftc != null && ftc.TracingCommentId == 0)
         {
             tc             = new TracingComment();
             tc.Description = ftc.Description;
             dbContext.TracingComments.Add(tc);
             dbContext.SaveChanges();
         }
         //else
         //{
         //    tc = dbContext.TracingComments.Find(ftc.TracingCommentId);
         //    tc.Description = ftc.Description;
         //    dbContext.TracingComments.Add(tc);
         //    dbContext.SaveChanges();
         //}
     }
     catch (Exception ex)
     {
     }
 }
 public IHttpActionResult SaveTracingComment(FrayteTracingComment comment)
 {
     new TracingRepository().SaveTracingComment(comment);
     return(Ok());
 }