Ejemplo n.º 1
0
 [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 }));
     }
 }
Ejemplo n.º 2
0
 [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);
 }