public async Task <IActionResult> Post([FromBody] Product product) { await _db.SaveChangesAsync(); var create = await _repo.AddItem(product); return(Ok(create)); }
public ActionResult <Customer> Post([FromBody] Customer value) { try { _repo.AddItem(value); return(Ok(value)); } catch (Exception e) { return(BadRequest($"Error : {e.Message}")); } }
public ActionResult <Customer> Post([FromBody] Customer customer) { try { _repo.AddItem(customer); return(Ok(customer)); } catch (Exception e) { return(BadRequest("error" + e.Message)); } }
public ActionResult <IEnumerable <Customer> > Post([FromBody] Customer value) { try { _repo.AddItem(value); return(Ok(value)); } catch (Exception e) { return(BadRequest("oops error" + e.Message)); } }
public ActionResult <Customer> Post([FromBody] Customer value) { try { _repo.AddItem(value); return(Ok(value)); } catch { return(BadRequest()); } }
public ActionResult <Customer> Post([FromBody] Customer customer) { try { repository.AddItem(customer); return(Ok(customer)); } catch (Exception) { return(BadRequest("not possible")); } }
public Note Post(Note noteToAdd) { return(_noteRepo.AddItem(noteToAdd)); }
public NoteCategory Post(NoteCategory catgToAdd) { return(_categoryRepo.AddItem(catgToAdd)); }
public async Task <IActionResult> Post([FromBody] SuperCategory super) { var create = await _repo.AddItem(super); return(Ok(create)); }
public void AddItem(QuickLaunchItem item) { _repo.AddItem(item); }
public async Task <IActionResult> Post([FromBody] User user) { var create = await _repo.AddItem(user); return(Ok(create)); }
public async Task <IActionResult> Post([FromBody] Category category) { var create = await _repo.AddItem(category); return(Ok(create)); }