All-Star
43671 Points
18691 Posts
Jul 12, 2019 01:08 PM|mgebhard|LINK
This is a duplicate thread.
https://forums.asp.net/p/2157689/6270090.aspx?When+I+am+getting+records+by+using+Web+Api+and+Code+First+model+it+showing+below+errors+can+you+please+help+me+
It looks like you are trying to request a cs file directly which is simply not possible.
http://localhost :/Spell/GetAllDistributorlist/Controllers/SpellController.cs
In Web API a controller action is requested which has the would look like.
http://localhost:1234/Spell/Action
Perhaps going through a few basic tutorials before moving forward?
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
Or explain what you are trying to do and include source code.
All-Star
43671 Points
18691 Posts
Re: When I am getting records by using Web Api and Code First model ,it showing below errors can...
Jul 12, 2019 01:08 PM|mgebhard|LINK
This is a duplicate thread.
https://forums.asp.net/p/2157689/6270090.aspx?When+I+am+getting+records+by+using+Web+Api+and+Code+First+model+it+showing+below+errors+can+you+please+help+me+
It looks like you are trying to request a cs file directly which is simply not possible.
http://localhost :/Spell/GetAllDistributorlist/Controllers/SpellController.cs
In Web API a controller action is requested which has the would look like.
Perhaps going through a few basic tutorials before moving forward?
https://docs.microsoft.com/en-us/aspnet/web-api/overview/getting-started-with-aspnet-web-api/tutorial-your-first-web-api
Or explain what you are trying to do and include source code.