public IActionResult YorumSil([FromBody] OgretmenYorum entity) { try { ogretmenYorumServis.Delete(new OgretmenYorum { Id = entity.Id }); return(Ok()); } catch (Exception e) { return(BadRequest(new { e.Message })); } }
public IActionResult YorumEkle([FromBody] OgretmenYorum entity) { try { ogretmenYorumServis.Add(new OgretmenYorum { Ad = entity.Ad, Soyad = entity.Soyad, Mail = entity.Mail, YorumIcerik = entity.YorumIcerik, Puan = entity.Puan, OgretmenId = entity.OgretmenId }); return(Ok()); } catch (Exception e) { return(BadRequest(new { e.Message })); } }
public void Update(OgretmenYorum entity) { ValidationTool.Validate(new OgretmenYorumValidator(), entity); dal.Update(entity); }
public void Delete(OgretmenYorum entity) { dal.Delete(entity); }