Пример #1
0
 public ActionResult <long> Status([FromRoute] int id)
 {
     return(DataFake.Orders().Where(x => x.Id == id).FirstOrDefault().IdStatus);
 }
Пример #2
0
 public ActionResult <IEnumerable <Order> > Order([FromRoute] int id)
 {
     return(DataFake.Orders().Where(x => x.IdBook == id).ToList());
 }
Пример #3
0
 public ActionResult <IEnumerable <Order> > AwaitingPayment()
 {
     return(DataFake.Orders().Where(x => x.IdStatus == (long)DataFake.OrderStatus.AwaitingPayment).ToList());
 }
Пример #4
0
 public ActionResult <IEnumerable <Order> > Approved()
 {
     return(DataFake.Orders().Where(x => x.IdStatus == (long)DataFake.OrderStatus.Approved).ToList());
 }
Пример #5
0
 public ActionResult <Order> Get(int id)
 {
     return(DataFake.Orders().Where(x => x.Id == id).FirstOrDefault());
 }
Пример #6
0
 public ActionResult <IEnumerable <Order> > Get()
 {
     return(DataFake.Orders());
 }
Пример #7
0
 public ActionResult <IEnumerable <Order> > Order([FromQuery] int id)
 {
     return(DataFake.Orders().Where(x => x.IdUser == id).ToList());
 }