Exemplo n.º 1
0
        static Review ConvertReviewToDB(BLReview review)
        {
            Review result = new Review
            {
                review1 = review.review.Substring(0, Math.Min(100, review.review.Length)),
                rating  = review.rating,
                name    = review.name,
            };

            return(result);
        }
Exemplo n.º 2
0
        private static BLReview ConvertReviewFromDB(Review dbReview)
        {
            BLReview result = new BLReview
            {
                id     = dbReview.id,
                name   = dbReview.name,
                rating = dbReview.rating,
            };

            return(result);
        }
        static Review ConvertReviewToDB(BLReview review)
        {
            Review result = new Review
            {
                id     = review.id,
                rating = review.rating,
                name   = review.name,
                text   = review.text,
            };

            return(result);
        }
        public static Review ConvertFromBL(BLReview review)
        {
            Review result = new Review
            {
                id     = review.id,
                name   = review.name,
                rating = review.rating,
                text   = review.text,
            };

            return(result);
        }
        public static void AddReview(BLReview reviews)
        {
            var temp = ConvertFromBL(reviews);

            CRUD.CreateReview(temp);
        }
 public void addReview(BLReview r)
 {
     Reviews.Add(r);
 }