0
我如何存取權限我在我的WebAPI的方法,當有多個GET,POST和刪除我的控制檯應用程序,方法我如何區分它們,這是我的API控制器如何從控制檯應用程序訪問Web API中的不同方法?
public IQueryable<Store> GetAll()
{
return StoreRepository.All;
}
//GetAll Stores including all relation tables
public IQueryable<Store> GetAllIncluding()
{
return StoreRepository.AllIncluding();
}
//Get store by id/id=5
public Store Find(long storeid)
{
stores = StoreRepository.Find(storeid);
return stores;
}
//Insert or Update Store
public void InsertorUpdateWithGraph(Store store)
{
StoreRepository.InsertOrUpdateWithGraph(store);
}
//Insert or Update StoreDetail
public void InsertOrUpdateStoreDetail(StoreDetail storedetail)
{
StoreRepository.InsertOrUpdateStoreDetail(storedetail);
}
//Get StoreDetail by id/id=5
public StoreDetail FindStoreDetail(long storedetailid)
{
storedetail = StoreRepository.FindStoreDetail(storedetailid);
return storedetail;
}
public List<StoreDetail> GetAllStoreDetails(long storedetailid)
{
List<StoreDetail> storedetails = StoreRepository.GetAllStoreDetails(storedetailid);
return storedetails;
}
public Sage FindSage(long sageid)
{
return StoreRepository.FindSage(sageid);
}
喜歡我可能有不止兩個獲取,發佈,插入或更新方法我必須從我的控制檯應用程序訪問此方法我如何映射我想要的方法,cana任何一個幫助我在這裏如何定義此路線