Example #1
0
        public IActionResult Update(Afetzede afetzede)
        {
            var result = _afetzedeService.Update(afetzede);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }
Example #2
0
        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."));
        }
Example #3
0
        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."));
        }