Exemple #1
0
 public ActionResult Create(CommentViewModel CommentModel, PictureViewModel Model)
 {
     if (CommentModel.Text != null)
     {
         var AccUserName      = User.Identity.Name;
         AccountViewModel acc = (Crud.GetAccount(AccUserName)).ToModel();
         CommentModel.Account = acc;
         CommentModel.Picture = Model;
         Crud.CreateComment(CommentModel.ToEntity());
     }
     return(List(Model.Id));
 }