public ActionResult CreateMediaWebsiteEGroupComment(int mediaWebsiteEGroupId)
        {
            var comment = new MediaWebsiteEGroupComment()
            {
                MediaWebsiteEGroupId = mediaWebsiteEGroupId
            };

            return(PartialView("_CreateOrEditMediaWebsiteEGroupComment", comment));
        }
 public ActionResult EditMediaWebsiteEGroupComment(MediaWebsiteEGroupComment MediaWebsiteEGroupcomment)
 {
     if (ModelState.IsValid)
     {
         _commentRepo.InsertOrUpdateMediaWebsiteEGroupComments(MediaWebsiteEGroupcomment);
         _commentRepo.Save();
         return(new HttpStatusCodeResult(HttpStatusCode.OK));
     }
     return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
 }
Exemple #3
0
 public void InsertOrUpdateMediaWebsiteEGroupComments(MediaWebsiteEGroupComment mediawebsiteegroupcomment)
 {
     if (mediawebsiteegroupcomment.Id == default(int))
     {
         // New entity
         context.MediaWebsiteEGroupComments.Add(mediawebsiteegroupcomment);
     }
     else
     {
         // Existing entity
         context.Entry(mediawebsiteegroupcomment).State = EntityState.Modified;
     }
 }