NorthWND-Api, Entity Framework Core kullanılarak veri erişimi sağlayan ve MSSQL ve PostgreSQL gibi çeşitli veritabanlarını destekleyen bir ASP.NET Core Web API projesidir.
[https://api.projeniz.com](https://github.com/danismazismail/NorthWND-Api)
- URL:
~/api/GetAllProductAsync
- Metod:
GET
- Açıklama: Tüm öğelerin listesini getirir.
- Yanıt:
[ { "productID": 3, "productName": "Aniseed Syrup", "unitPrice": 10.0000, "unitsInStock": 13, "categoryID": 2, "categoryName": "YaptımmmmmmOldu" }, { "productID": 40, "productName": "Boston Crab Meat", "unitPrice": 18.4000, "unitsInStock": 123, "categoryID": 8, "categoryName": "hedebidi" },
- URL:
/api/GetDetailAsync/{id}
- Metod:
GET
- Açıklama: Belirtilen ID'ye sahip bir öğeyi getirir.
- Parametreler:
id
(integer, zorunlu): Getirilecek öğenin ID'si.
- Yanıt:
{ "productID": 3, "productName": "Aniseed Syrup", "supplierID": null, "supplierCompanyName": null, "categoryID": null, "categoryName": null, "quantityPerUnit": "12 - 550 ml bottles", "unitPrice": 10.0000, "unitsInStock": 13, "unitsOnOrder": 70, "reorderLevel": 25, "discontinued": false
} ```
- URL:
/api/addOrderWithDetails
- Metod:
POST
- Açıklama: Yeni bir sipariş oluşturur.
- İstek Gövdesi:
{ "name": "Yeni Öğe", "description": "Yeni öğe için açıklama" }
- Yanıt:
{ "id": 3, "name": "Yeni Öğe", "description": "Yeni öğe için açıklama" }
- URL:
/api/items/{id}
- Metod:
PUT
- Açıklama: Mevcut bir öğeyi günceller.
- Parametreler:
id
(integer, zorunlu): Güncellenecek öğenin ID'si.
- İstek Gövdesi:
{ "name": "Güncellenmiş Öğe", "description": "Öğenin güncellenmiş açıklaması" }
- Yanıt:
{ "id": 1, "name": "Güncellenmiş Öğe", "description": "Öğenin güncellenmiş açıklaması" }
- URL:
/api/items/{id}
- Metod:
DELETE
- Açıklama: Belirtilen ID'ye sahip bir öğeyi siler.
- Parametreler:
id
(integer, zorunlu): Silinecek öğenin ID'si.
- Yanıt:
{ "message": "Öğe başarıyla silindi" }
Bu projeyi kullanmaya başlamak için, depoyu klonlayın ve aşağıdaki adımları izleyin.
git clone https://github.com/danismazismail/NorthWND-Api.git
cd NorthWND-Api