コード例 #1
0
 public ActionResult <IEnumerable <Order> > Order([FromRoute] int id)
 {
     return(DataFake.Orders().Where(x => x.IdBook == id).ToList());
 }
コード例 #2
0
 public ActionResult <IEnumerable <Book> > Genre([FromRoute] string genre)
 {
     return(DataFake.Books().Where(x => x.Genre == genre).ToList());
 }
コード例 #3
0
 public ActionResult <Book> Get(int id)
 {
     return(DataFake.Books().Where(x => x.Id == id).FirstOrDefault());
 }
コード例 #4
0
 public ActionResult <IEnumerable <Commentary> > Commentary([FromRoute] int id)
 {
     return(DataFake.Commentarys().Where(x => x.IdBook == id).ToList());
 }
コード例 #5
0
 public ActionResult <long> Status([FromRoute] int id)
 {
     return(DataFake.Orders().Where(x => x.Id == id).FirstOrDefault().IdStatus);
 }
コード例 #6
0
 public ActionResult <IEnumerable <Book> > Get()
 {
     return(DataFake.Books());
 }
コード例 #7
0
 public ActionResult <IEnumerable <Order> > Approved()
 {
     return(DataFake.Orders().Where(x => x.IdStatus == (long)DataFake.OrderStatus.Approved).ToList());
 }
コード例 #8
0
 public ActionResult <IEnumerable <Order> > AwaitingPayment()
 {
     return(DataFake.Orders().Where(x => x.IdStatus == (long)DataFake.OrderStatus.AwaitingPayment).ToList());
 }
コード例 #9
0
 public ActionResult <IEnumerable <Order> > Get()
 {
     return(DataFake.Orders());
 }
コード例 #10
0
 public ActionResult <Order> Get(int id)
 {
     return(DataFake.Orders().Where(x => x.Id == id).FirstOrDefault());
 }
コード例 #11
0
 public ActionResult <IEnumerable <Commentary> > Get()
 {
     return(DataFake.Commentarys());
 }
コード例 #12
0
 public ActionResult <ShoppingCar> Get(int id)
 {
     return(DataFake.ShoppingCar().Where(x => x.Id == id).FirstOrDefault());
 }
コード例 #13
0
 public ActionResult <IEnumerable <ShoppingCar> > Get()
 {
     return(DataFake.ShoppingCar());
 }
コード例 #14
0
 public ActionResult <IEnumerable <ShoppingCar> > ShoppingCar([FromQuery] int id)
 {
     return(DataFake.ShoppingCar().Where(x => x.IdUser == id).ToList());
 }
コード例 #15
0
 public ActionResult <IEnumerable <Order> > Order([FromQuery] int id)
 {
     return(DataFake.Orders().Where(x => x.IdUser == id).ToList());
 }