Example #1
0
 public IActionResult GetCustomerById(int id, [FromQuery] string include)
 {
     if (include == "products")
     {
         return(Ok(_storage.GetCustomerandProduct(id)));
     }
     else if (include == "payments")
     {
         return(Ok(_storage.GetCustomerandPayments(id)));
     }
     else
     {
         return(Ok(_storage.GetCustomerById(id)));
     }
 }