title: .NET Core 2.2-How to use backchannel to display bot welcome message before user types in Webchat
body: <p>I am trying to make my chatbot display the initial welcome message without the user having to type first to initiate conversation in webchat. </p>
  
  <p>I have found this solution of using backchannel: <a href="https://stackoverflow.com/questions/50982168/sending-a-greeting-welcome-message-from-the-bot-as-soon-as-the-webchat-control-i">here</a></p>
  
  <p>but since the ApiController class is deprecated in <code>.NET core 2.2</code> I cannot use this solution. </p>
  
  <h2>MessagesController.cs</h2>
  
  <pre><code>[BotAuthentication]
  public class MessagesController : ApiController
  
  { 
  
      public async Task&lt;HttpResponseMessage&gt; Post([FromBody]Activity activity)
      {
          . . .
          if (activity.Type == ActivityTypes.Message)
          {
              await Conversation.SendAsync(activity, () =&gt; new  Dialogs.RootDialog());
          }
          . . .
          var response = Request.CreateResponse(HttpStatusCode.OK);
          return response;
  }
  </code></pre>
  
  <p>Because of this, in the above sample code provided in the solution, 'Conversation' and 'Request' do not exist in the current context.
  I am looking for a version of the above solution that works with <code>.NET core 2.2</code>.</p>