private string GetCoffeeShopNameAndMoreDetails(int id) { BsdsAccess bsdsAccess = new BsdsAccess(); CoffeeShop shop = bsdsAccess.GetCoffeeShopById(id); string result = shop.DisplayName; if (shop.IsWiFiHotSpot) { result = result + " and it has a wifi connection!"; } else { result = result + " but there is no wifi :("; } if (shop.SeatingCapacity < 10) { result = result + " This is quite a small shop."; } else if (shop.SeatingCapacity < 20) { result = result + " This is a medium shop."; } else { result = result + " This is a huge shop!"; } if (shop.SeatingCapacity > 20 && shop.AcceptsCoffeeCards) { result = result + "It's a good place for our party!"; } return result; }
private string GetCoffeeShopName(int id) { BsdsAccess bsdsAccess = new BsdsAccess(); CoffeeShop result = bsdsAccess.GetCoffeeShopById(id); string displayName = result.DisplayName; return displayName; }