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