public IHttpActionResult GetAll() { var sel = repo.GetAll(); List <SellPosting> u = new List <SellPosting>(); foreach (var data in sel) { data.Links.Add(new Links() { HRef = "http://localhost:62832/api/users", Method = "GET", Rel = "Get all the user list" }); data.Links.Add(new Links() { HRef = "http://localhost:62832/api/users", Method = "POST", Rel = "Create a new user resource" }); data.Links.Add(new Links() { HRef = "http://localhost:62832/api/users/" + data.SellId, Method = "PUT", Rel = "Modify an existing user resource" }); data.Links.Add(new Links() { HRef = "http://localhost:62832/api/users/" + data.SellId, Method = "DELETE", Rel = "Delete an existing user resource" }); u.Add(data); } return(Ok(u)); }
public IHttpActionResult GetAll() { return(Ok(repo.GetAll())); }