yadavdep
asked on
.NET core web API response structure or format
I am building a Web API in Asp.net core.
This service will be json service and I was given a fixed structure in which all the web API method should return their response results show as below.
I need to know is what be the best way of implementing this.
One option is I create with properties ( same needed for response) and return that as response and set values in its properties.
Or is there any other way as well. Please let me know
This service will be json service and I was given a fixed structure in which all the web API method should return their response results show as below.
I need to know is what be the best way of implementing this.
One option is I create with properties ( same needed for response) and return that as response and set values in its properties.
Or is there any other way as well. Please let me know
{
Data: {Result object },
Status: true | false
code: 1 | 2 | 3
Message: “Any error Message”
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.