public IActionResult Update(Afetzede afetzede) { var result = _afetzedeService.Update(afetzede); if (result.Success) { return(Ok(result)); } return(BadRequest(result)); }
public IResult Update(Afetzede afetzede) { var result = BusinessRules.Run( CheckIfAfetzedeExistsById(afetzede.Id) ); if (result != null) { return(result); } _afetzedeDal.Update(afetzede); return(new SuccessResult("Afetzede başarıyla güncellendi.")); }
public IResult Add(Afetzede afetzede) { var result = BusinessRules.Run( CheckIfAfetzedeNotExistsByTcNo(afetzede.TcYuNo) ); if (result != null) { return(result); } afetzede.KayitTarihi = DateTime.Now; _afetzedeDal.Add(afetzede); return(new SuccessResult("Afetzede başarıyla eklendi.")); }