title: Create cookie with ASP.NET Core
body: <p>In ASP.NET MVC 5 I had the following extension:</p>
  <pre class="lang-cs prettyprint-override"><code>public static ActionResult Alert(this ActionResult result, String text) {
      HttpCookie cookie = new HttpCookie(&quot;alert&quot;) { Path = &quot;/&quot;, Value = text };
      HttpContext.Current.Response.Cookies.Add(cookie);
      return result;
  }
  </code></pre>
  <p>Basically I am adding a cookie with a text.</p>
  <p>In ASP.NET Core I can't find a way to create the <code>HttpCookie</code>. Is this no longer possible?</p>