Beispiel #1
0
 public static Comment MapCommentDtoToComment(ICommentDto comment, Guid id)
 {
     return new Comment()
     {
         BodyComment = comment.BodyComment,
         DateCreated = DateTime.Now,
         EMail = comment.EMail,
         MovieId = comment.MovieId,
         Name = comment.Name,
         UserId = id
     };
 }
Beispiel #2
0
 public bool AddComment(ICommentDto comment, Guid id)
 {
     provider.Comment.Add(Mapper.MapCommentDtoToComment(comment, id));
     return ((DbContext)provider).SaveChanges() != 0;
 }