asp.net web api - Using Action link with Web Api Controller -


How can I use an application when an operator calls an action that is a WebAP controller.

  public class requestcontroller: API controller {[Actioneme ("Actisation")] [Response type (type off (request)) Public ASSink Task & lt; IHttpActionResult & gt; PostRequest (Request Request) {If (ModelState.IsValid!) {Change BadRequest (ModelState); } Db.Requests.Add (request); Wait db.SaveChangesAsync (); Return Created Arm route ("DefaultApi", new {id = request.Id}, request); }}  

In my layout page I can

  • @ Html.ActionLink ("request", "create action", "API / request", new {domain = ""} , Null)
  • Jawahar

    You can generate a link The following link will point to an album controller using the standard URL asset property and an API controller will pass along an ID parameter with the value of 3: . ", Id = 3})

    Please refer to this link


    Comments

    Popular posts from this blog

    java - org.apache.http.ProtocolException: Target host is not specified -

    java - Gradle dependencies: compile project by relative path -

    ruby on rails - Object doesn't support #inspect when used with .include -