Hi All,
How to use attribute routing, Below is the code How I used in my project but does not work.
[Route("api/PropertyDetails/{ownerId}")]
public IEnumerable<PropertyDetailsTbl> GetPropertyDetailByOwerId(int ownerId)
{
using (PropertyDetailsBusiness propertyDetailsBusiness = new PropertyDetailsBusiness())
{
List<PropertyDetailsTbl> list = propertyDetailsBusiness.GetAllByOwnerID(ownerId).ConvertAll(item => (PropertyDetailsTbl)item);
return list as IEnumerable<PropertyDetailsTbl>;
}
}