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