Esempio n. 1
0
        public void Delete(Color entity)
        {
            var color = _colorDal.GetById(entity.Id);

            if (color == null)
            {
                throw new NullReferenceException("Silinecek renk bulunamadı!");
            }
            _colorDal.Delete(color);
        }
Esempio n. 2
0
        public IResult Delete(Color entity)
        {
            var color = _colorDal.GetById(entity.Id);

            if (color == null)
            {
                return(new ErrorResult());
            }
            _colorDal.Delete(color);
            return(new SuccessResult());
        }
 public IDataResult <Color> GetById(int Id)
 {
     if (_colorDal.GetAll(c => c.Id == Id).Count > 0)
     {
         return(new SuccessDataResult <Color>(_colorDal.GetById(c => c.Id == Id), Messages.RecordFound));
     }
     return(new ErrorDataResult <Color>(Messages.IdInvalid));
 }
Esempio n. 4
0
        public IDataResult <Color> GetById(int id)
        {
            var result = _colorDal.GetById(p => p.Id == id);

            if (result != null)
            {
                return(new SuccessDataResult <Color>(result, Messages.Listed));
            }

            return(new ErrorDataResult <Color>(Messages.Error));
        }
Esempio n. 5
0
        //silme
        public IResult Delete(Color entity)
        {
            //ilgili id ye göre silincek aracaı marka değişkeni içerisine ata
            var color = _colorDal.GetById(entity.ColorId);

            //boş ise
            if (color == null)
            {
                return(new ErrorDataResult <List <Car> >(Messages.ColorDeletedError));
            }
            _colorDal.Delete(color);
            return(new SuccessResult(Messages.ColorDeleted));
        }
Esempio n. 6
0
        public IBusinessDataResult <Color> GetById(int id)
        {
            var data = _colorDal.GetById(id);

            string message;
            bool   isSuccess;

            if (data == null)
            {
                message   = Messages.ColorNotFound;
                isSuccess = false;
            }
            else
            {
                message   = Messages.ColorGetListByRegistered;
                isSuccess = true;
            }

            return(new BusinessDataResult <Color>(message, isSuccess, data));
        }
Esempio n. 7
0
 public IDataResult <Color> GetById(int id)
 {
     return(new SuccesDataResult <Color>(_colorDal.GetById(p => p.Id == id)));
 }
Esempio n. 8
0
 public IDataResult <Color> GetById(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(c => c.Id == id), true, "Ürün Getirildi."));
 }
Esempio n. 9
0
 public IDataResult <Color> GetById(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(p => p.ColorId == id), Messages.SuccessMessage));
 }
Esempio n. 10
0
 public IDataResult <Color> GetByColorId(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(c => c.ColorId == id)));
 }
Esempio n. 11
0
 public List <Color> GetById(int id)
 {
     return(_colorDal.GetById(id));
 }
Esempio n. 12
0
 public IDataResult <Color> GetById(int colorId)
 {
     return(new DataResult <Color>(_colorDal.GetById(c => c.Id == colorId), true, "Başarılı getirildi"));
 }
Esempio n. 13
0
 public IDataResult <Color> GetById(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(cl => cl.ColorId == id), BasicMessages.ProcessCompleted));
 }
 public Color GetColorNameByColorId(int colorId)
 {
     return(_colorDal.GetById(colorId));
 }
Esempio n. 15
0
 public IDataResult <Color> Get(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(x => x.Id == id), Messages.ColorGet));
 }
 public IDataResult <Color> GetById(int id)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(id), Messages.ColorsListedById));
 }
Esempio n. 17
0
 public IDataResult <Color> GetById(int colorId)
 {
     return(new SuccessDataResult <Color>(_colorDal.GetById(x => x.Id == colorId)));
 }
 public IDataResult <Colors> GetById(int id)
 {
     return(new SuccessDataResult <Colors>(_colorDal.GetById(c => c.ColorId == id), SuccessMessages.ColorListed));
 }
Esempio n. 19
0
 public IDataResult <Color> GetById(int colorId)
 {
     return(new DataResult <Color>(_colorDal.GetById(c => c.Id == colorId), true));
 }
Esempio n. 20
0
 public Color GetById(int colorId)
 {
     return(_colorDal.GetById(c => c.Id == colorId));
 }
Esempio n. 21
0
 public Color GetById(int Id)
 {
     return(_colorDal.GetById(p => p.ColorId == Id));
 }