コード例 #1
0
        public void Enrich(IHalResponseBuilder halResponseBuilder, ShopComment shopComment, string shopId)
        {
            if (halResponseBuilder == null)
            {
                throw new ArgumentNullException(nameof(halResponseBuilder));
            }

            if (shopComment == null)
            {
                throw new ArgumentNullException(nameof(shopComment));
            }

            halResponseBuilder.AddEmbedded(e => e.AddObject(_responseBuilder.GetShopComment(shopComment),
                                                            (l) => l.AddOtherItem("shop", new Dtos.Link("/" + Constants.RouteNames.Shops + "/" + shopId))));
        }