public class UserModel
{
public string KulaniciAdi;
public string Sifre;
}
[HttpGet]
[Route("Urunler/StoktaKalmayanlar")]
public async Task<System.Web.Http.IHttpActionResult> StoktaKalmayanlar(
[FromBody] UserModel dsUser , string dsApiPass)
{
var s1 = await (from u in db.Products
where u.UnitsInStock <= 0
select new
{
u.ProductID
,
u.ProductName
,
u.UnitPrice
}).OrderBy(p => p.ProductName).ToListAsync();
if (s1 == null)
{
return NotFound();
}
return Ok(s1);
}
Yorumlar
Yorum Gönder