Exemplo n.º 1
0
        public static RestaurantReviewBusinessLayer.Restaurant ToData(Restaurant webRestaurant)
        {
            var dataRestaurant = new RestaurantReviewBusinessLayer.Restaurant()
            {
                Id      = webRestaurant.Id,
                Name    = webRestaurant.Name,
                Address = webRestaurant.Address
            };

            return(dataRestaurant);
        }
Exemplo n.º 2
0
        private static Restaurant ToWeb(RestaurantReviewBusinessLayer.Restaurant rest)
        {
            Restaurant r = new Restaurant
            {
                Id        = rest.Id,
                Name      = rest.Name,
                Address   = rest.Address,
                AvgRating = rest.AvgRating,
            };

            return(r);
        }