public override int GetHashCode() { return(RestaurantID.GetHashCode() ^ FromUserID.GetHashCode() ^ CommentContent.GetHashCode() ^ CommentTime.GetHashCode()); }
public CommentViewModel ToViewModel() { return(new CommentViewModel { Commentator = Commentator.UserName, CommentTime = CommentTime.ToString("yyyy-MM-dd HH:mm:ss"), Content = Content, Score = Score }); }
public override bool Equals(object obj) { if (obj == null || !(obj is ERRestaurantComment)) { return(false); } return(RestaurantID.Equals((obj as ERRestaurantComment).RestaurantID) & FromUserID.Equals((obj as ERRestaurantComment).FromUserID) & CommentContent.Equals((obj as ERRestaurantComment).CommentContent) & CommentTime.Equals((obj as ERRestaurantComment).CommentTime)); }