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 }; }
public bool AddComment(ICommentDto comment, Guid id) { provider.Comment.Add(Mapper.MapCommentDtoToComment(comment, id)); return ((DbContext)provider).SaveChanges() != 0; }