Exemplo n.º 1
0
        public IDataResult <Country> GetById(int id)
        {
            var result = BusinessRules.Run(CheckIfEntityIdValid(id));

            if (result == null)
            {
                return(new SuccessDataResult <Country>(_countryDal.Get(c => c.Id == id), BusinessMessages.CountrytDetailsListed));
            }

            return(new ErrorDataResult <Country>());
        }
Exemplo n.º 2
0
        public bool IsExistName(string name)
        {
            var exist = _countryDal.Get(x => x.Name == name);

            if (exist != null)
            {
                return(true);
            }
            return(false);
        }
 public Country Get(int Id)
 {
     return(_CountryDal.Get(x => x.Id == Id));
 }
Exemplo n.º 4
0
 public Country GetCountry(int Id)
 {
     return(_countryDal.Get(k => k.Id == Id));
 }
Exemplo n.º 5
0
        public Country GetCountry(int Id)
        {
            var result = _countryDal.Get(x => x.Id == Id);

            return(result);
        }
Exemplo n.º 6
0
 public Country GetById(short id)
 {
     return(_countryDal.Get(x => x.Id == id));
 }
 public IDataResult <Country> GetById(int id)
 {
     return(new SuccessDataResult <Country>(_countryDal.Get(c => c.Id == id)));
 }
Exemplo n.º 8
0
 public IDataResult <Country> GetCountryByCountryId(int countryid)
 {
     return(new SuccessDataResult <Country>(_countryDal.Get(p => p.countryId == countryid)));
 }