Beispiel #1
0
        public void VerifyShopProductExists(Guid shopProductGuid, ICloneableException <Exception> e)
        {
            var product = ShopProducts.FirstOrDefault(prod => prod.Guid.Equals(shopProductGuid));

            if (product == null)
            {
                StackTrace stackTrace = new StackTrace();
                var        msg        = string.Format(Resources.EntityNotFound, "product", shopProductGuid) +
                                        "In shop with Guid - {Guid}" + $" cant complete {stackTrace.GetFrame(1).GetMethod().Name}";
                throw e.Clone(msg);
            }
        }