Adapter Pattern
allows the interface of an existing class to be used as another interface
Type 1: Object Adapter Pattern
Type 2: Class Adapter Pattern
Pick a fishing trip
Pick a boat
public interface iAdapterPattern
{
   string getFishingTripDetails(string inTrip, string inBoat);
}

public abstract class AdapterPattern
{
   public abstract iAdapterPattern getFishingTripDetails(string inTrip, string inBoat);
}

public class TunaTrip : iAdapterPattern
{
   public string getFishingTripDetails(string inTrip, string inBoat)
   {
      return ("you requested a Tuna trip on the " + inBoat);
   }
}

public class TroutTrip : iAdapterPattern
{
   public string getFishingTripDetails(string inTrip, string inBoat)
   {
      return ("you requested a Trout trip");
   }
}

public class GetFishingTrip : AdapterPattern
{
   public override iAdapterPattern getFishingTripDetails(string inTrip, string inBoat)
   {
      switch (inTrip)
      {
         case "Tuna": return new TunaTrip();
         case "Trout": return new TroutTrip();
         default: throw new ApplicationException(string.Format("Trip '{0}' cannot be created", inTrip));
      }
   }
}
//end of Adapter class
//Controller methods
public ActionResult AdapterPattern()
{
   return View();
}

public string GetFishingTrip(string inTrip, string inBoat)
{
   switch (inTrip)
   {
      case "Tuna":
         TunaTrip tuna = new TunaTrip();
         return (tuna.getFishingTripDetails(inTrip, inBoat));
      case "Trout":
         TroutTrip trout = new TroutTrip();
         return (trout.getFishingTripDetails(inTrip, inBoat));
      default:
         return string.Empty;
   }
}
//end of Controller methods
//AdapterPattern.cshtml
@model MvcBootstrap.Models.iAdapterPattern
@{
  ViewBag.Title = "Adapter Pattern";
  Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="~/Scripts/jquery-2.1.4.min.js"></script>
@Styles.Render("~/Content/bootstrap.css")

<div class="row col-sm-12">
  <center>
    <div class="row col-sm-12 fontXLargeBoldBlack">Adapter Pattern</div>
    <div class="row col-sm-12 fontLargeBoldBlack">
      allows the interface of an existing class to be used as another interface
    </div>
    <div class="row col-sm-12 fontLargeBoldBlack paddingLeft25">
      Type 1: Object Adapter Pattern
    </div>
    <div class="row col-sm-12 fontLargeBoldBlack paddingLeft25">
      Type 2: Class Adapter Pattern
    </div>
  </center>
</div>

<div class="row col-sm-12 fontXLargeBoldRed text-center" style="margin-top:20px;">Pick a fishing trip</div>
<div class="row rowHeight20px"></div>

<div class="row col-sm-12 form-check-inline fontLargeBold" id="dvRadioButtons">
  <center>
    <label class="radio-inline lblFish"><input type="radio" class="optTrip" name="optTrip" value="Trout">Trout</label>
    <label class="radio-inline lblFish"><input type="radio"  class="optTrip" name="optTrip" value="Tuna">Tuna</label>
  </center>
</div>


<div class="row col-sm-12 form-check-inline hideDvBoat" id="dvBoat">
  <center>
    <div class="row col-sm-12 fontXLargeBoldRed text-center marginTop20" style="margin-top:20px;">Pick a boat</div>
    <div class="row rowHeight20px"></div>
    <div class="row fontLargeBold ">
      <label class="radio-inline lblBoat"><input type="radio" class="optBoat "name="optBoat" value="Chief">Chief</label>
      <label class="radio-inline lblBoat"><input type="radio" class="optBoat "name="optBoat" value="Prowler">Prowler</label>
      <label class="radio-inline lblBoat"><input type="radio" class="optBoat "name="optBoat" value="Tomahawk">Tomahawk</label>
    </div>
  </center>
</div>

<div id="dvBookedTrip" class="dvBookedTrip row col-sm-12 well text-center fontLargeBold marginTop20"></div>