public bool EkleKiralama(KiralikBilgi entity) { try { using (KiralikBilgiBusiness kiralikBilgiBusiness = new KiralikBilgiBusiness()) { kiralikBilgiBusiness.Ekle(entity); } return(true); } catch (Exception) { return(false); } }
public IHttpActionResult Post([FromBody] KiralikBilgi kiralikbilgi) { var content = new ResponseContent <KiralikBilgi>(null); if (kiralikbilgi != null) { using (var kiralikBilgiBusiness = new KiralikBilgiBusiness()) { content.Result = kiralikBilgiBusiness.Ekle(kiralikbilgi) ? "1" : "0"; return(new StandartResult <KiralikBilgi>(content, Request)); } } content.Result = "0"; return(new StandartResult <KiralikBilgi>(content, Request)); }