public ActionResult YakitTanimlaKaydet(yakit model) { var sonuc = _vadeGunSayisi.YakitKaydet(model); if (sonuc == true) { return(Json(true, JsonRequestBehavior.AllowGet)); } else { return(Json(false, JsonRequestBehavior.AllowGet)); } }
public bool YakitKaydet(yakit model) { try { model.toplam_tutar = model.birim_fiyat * model.alinan_miktar; _yakitRepository.Insert(model); if (_uow.SaveChanges() > 0) { return(true); } else { return(false); } } catch (Exception ex) { throw ex; } }