public static UserComment ToUserComment(this d.MovieCommentEntity comment) { return(new UserComment() { Id = comment.Id, Title = comment.Title, Content = comment.Content, Value = comment.Value, MovieTitle = comment.MovieTitle, MovieId = comment.MovieId, Created_at = comment.Created_at }); }
public static MovieComment ToMovieComment(this d.MovieCommentEntity comment) { return(new MovieComment() { Id = comment.Id, Title = comment.Title, Content = comment.Content, Value = comment.Value, Login = comment.Login, UserId = comment.UserId, Created_at = comment.Created_at }); }
//****Mappers for multiple Comments models from DAL to API**** public static CompleteComment ToApi(this d.MovieCommentEntity comment) { return(new CompleteComment() { Id = comment.Id, Title = comment.Title, Content = comment.Content, Value = comment.Value, MovieTitle = comment.MovieTitle, Login = comment.Login, MovieId = comment.MovieId, UserId = comment.UserId, Created_at = comment.Created_at }); }