예제 #1
0
        public static RestaurantReviewData.Review RevObjToDB(Models.Review revObj)
        {
            RestaurantReviewData.Review addReview = new RestaurantReviewData.Review()
            {
                ID       = revObj.ID,
                Reviewer = revObj.Reviewer,
                Text     = revObj.Text,
                Rating   = revObj.Rating,
            };

            return(addReview);
        }
예제 #2
0
        public static Models.Review DBToRevObj(RestaurantReviewData.Review DBRev)
        {
            Models.Review newReview = new Models.Review(DBRev.Reviewer, DBRev.Text, DBRev.Rating)
            {
                Reviewer = DBRev.Reviewer,
                Text     = DBRev.Reviewer,
                Rating   = DBRev.Rating,
                RestID   = DBRev.RestID
            };

            return(newReview);
        }