public IActionResult Post(Reservation reservation)
        {
            _expressoDbContext.Reservations.Add(reservation);
            _expressoDbContext.SaveChanges();

            return(StatusCode(StatusCodes.Status201Created));
        }
        public IActionResult Post([FromBody] Reservation reservation)
        {
            _context.Reservations.Add(reservation);
            _context.SaveChanges();

            return(StatusCode(StatusCodes.Status201Created));
        }
 public IActionResult Post([FromBody] Reservation reservation)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     _expressoDbContext.Reservations.Add(reservation);
     _expressoDbContext.SaveChanges();
     return(StatusCode(StatusCodes.Status201Created));
 }
예제 #4
0
 public IHttpActionResult Post(Reservation reservation)
 {
     if (!ModelState.IsValid)
     {
         return(BadRequest(ModelState));
     }
     expressoDbContext.Reservations.Add(reservation);
     expressoDbContext.SaveChanges();
     return(StatusCode(HttpStatusCode.Created));
 }
예제 #5
0
 public IActionResult Post(Reservation reservation)
 {
     expressoDb.Reservations.Add(reservation);
     expressoDb.SaveChanges();
     return(StatusCode(201));
 }
 public void AddReservation(Reservation reservation)
 {
     expressoDbContext.Reservations.Add(reservation);
     expressoDbContext.SaveChanges(true);
 }
 public IActionResult Post([FromBody] Certification certification)
 {
     _expressoDbContext.Certification.Add(certification);
     _expressoDbContext.SaveChanges();
     return(StatusCode(StatusCodes.Status201Created));
 }
예제 #8
0
 public IActionResult Post([FromBody] Languages languages)
 {
     _expressoDbContext.Languages.Add(languages);
     _expressoDbContext.SaveChanges();
     return(StatusCode(StatusCodes.Status201Created));
 }
예제 #9
0
 public IActionResult Post(Registration registration)
 {
     _expressoDbContext.Registrations.Add(registration);
     _expressoDbContext.SaveChanges();
     return(StatusCode(statusCode: 201));
 }
예제 #10
0
 public void AddMenu(Menu menu)
 {
     expressoDbContext.Add(menu);
     expressoDbContext.SaveChanges(true);
 }
예제 #11
0
 public IActionResult Post([FromBody] TechSkill techskill)
 {
     _expressoDbContext.TechSkill.Add(techskill);
     _expressoDbContext.SaveChanges();
     return(StatusCode(StatusCodes.Status201Created));
 }