private IResult ColorExists(int id) { if (_colorDal.Exists(b => b.Id == id)) { return(new SuccessResult()); } return(new ErrorResult(Messages.ColorNotFound)); }
private IResult ColorExists(int id) { if (_colorDal.Exists(c => c.ColorId == id)) { return(new SuccessResult()); } return(new ErrorResult()); }
private IResult CheckNotExistsByName(string name) { return((_colorDal.Exists(c => c.Name == name)) ? new ErrorResult(Messages.ColorExists) : new SuccessResult()); }