Example #1
0
        public string SayHello()
        {
            //var vendor = new Vendor();
            //vendor.SendWelcomeEmail("Message from Product");
            var emailService = new EmailService();

            emailService.SendMessage("New Product", this.ProductName, "*****@*****.**");
            //can implement a using static statement
            var result = LoggingService.LogAction("saying hello");

            return("Hello " + ProductName +
                   " (" + ProductId + "): " +
                   ProductDescription +
                   " Available on: " +
                   AvailibilityDate?.ToShortDateString());
        }
Example #2
0
        public string SayHello()
        {
            //var vendor = new Vendor();
            //vendor.SendWelcomeEmail("Message for product");

            var emailService = new EmailService();
            var confirmation = emailService.SendMessage("New Product", ProductName, "*****@*****.**");

            var result = LogAction("saying hello!");

            return("Hello " + ProductName + " (" + ProductId + "): " + Description + " Available on: " + AvailibilityDate?.ToShortDateString());
        }