Thursday, 7 April 2022

asp.net 5 apis

 in this return type should be json i did few changes in web.app.config.cs

public class CustomJsonFormatter : JsonMediaTypeFormatter

    {

        public CustomJsonFormatter()

        {

            this.SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html"));

        }


in register give this line 

 config.Formatters.Add(new CustomJsonFormatter());

issue return type createdaction not working .


issue not working while crateing controller model error while code generator 



https://stackoverflow.com/questions/34992599/cant-add-view-from-controller-in-vs-2015-there-was-an-error-running-the-sele


No comments:

Post a Comment

remove duplicates in an sorted array

  using System; public class HelloWorld {          public static void Main(string[] args)     {         int[] ar={2,2,3,3,4,6,6};          C...