public Experience Post([FromBody] Experience model) { // POST: api/User // this post method insert the new row or update the current row if there is a record with same ID ExperienceDE de = new ExperienceDE(); Experience sonuc = de.AddExperience(model); return(sonuc); }
public IEnumerable <Experience> Get(int id) { // GET: api/Experience //HttpContext.RiseError(new InvalidOperationException("Test")); Experience model = new Experience(); ExperienceDE de = new ExperienceDE(); return(de.GetExperience(id)); }
public IActionResult Delete(int id) { // DELETE: api/ApiWithActions/5 ExperienceDE de = new ExperienceDE(); bool sonuc = de.DeleteExperience(id); if (sonuc) { return(Ok()); } else { return(NotFound()); } }
public IActionResult Put([FromBody] Experience model) { // POST: api/Experience // this post method insert the new row or update the current row if there is a record with same ID ExperienceDE de = new ExperienceDE(); bool sonuc = de.UpdateExperience(model); if (sonuc) { return(Ok()); } else { return(NotFound()); } }