[Route("yorumSil")]// public IActionResult YorumSil([FromBody] OkulYorum entity) { try { okulYorumServis.Delete(new OkulYorum { Id = entity.Id }); return(Ok()); } catch (Exception e) { return(BadRequest(new { e.Message })); } }
[Route("yorumEkle")]// public IActionResult YorumEkle([FromBody] OkulYorum entity) { try { okulYorumServis.Add(new OkulYorum { Ad = entity.Ad, Soyad = entity.Soyad, Mail = entity.Mail, YorumIcerik = entity.YorumIcerik, Puan = entity.Puan, OkulId = entity.OkulId }); return(Ok()); } catch (Exception e) { return(BadRequest(new { e.Message })); } }
public void Update(OkulYorum entity) { ValidationTool.Validate(new OkulYorumValidator(), entity); dal.Update(entity); }
public void Delete(OkulYorum entity) { dal.Delete(entity); }