Im new to Web Api. I need help with creating a simple RESTful API (with Web api). I want to return blog posts by Id and by blog posts by category. But im getting this error:
"'PostController' already defines a member called 'Get' with the same parameter types"
How shall I solve this? Perhaps by attribute routing? Send me code how to solve this as per best practice.
BELOW IS CODE:
// GET api/values/5
public JsonResult Get(int id)
return new JsonResult([login to view URL](id));
public JsonResult Get(string searchString)
return new JsonResult([login to view URL](searchString));
public JsonResult Get(string category)
return new JsonResult([login to view URL]());
As said, I´m new to Web API and I think the problem is very simple. If you know Web API this might take only 5 min to solve.
31 freelancers estão ofertando em média $59 nesse trabalho
i am a lead .Net software engineer and responsible for creating web and desktop applications using different languages and technologies if u r interested just send me a message thank you and good luck
Hi Sir, I can help you in your web Api methods , it will not take more than one hour ,can start with you immediately ,message me for more discuss . . . Regards,Sarah