public List <Province> Get() { var get = _provinceRepository.Get(); if (get == null) { throw new NullReferenceException(); } return(get); }
/// <summary> /// The GetProvince /// </summary> /// <param name="id">The id<see cref="int"/></param> /// <returns>The <see cref="ServiceResult"/></returns> public ServiceResult GetProvince(int id) { return(new ServiceResult(true) { Data = _repository.Get(x => x.Identifier == id) }); }
public ActionResult <IEnumerable <Province> > Get() { return(_provinceRepo.Get().ToList()); }
public List <Province> Get() { return(_provinceRepository.Get()); }
public List <Province> Get() { var result = _provinceRepository.Get(); return(result); }
public async Task <ActionResult> Get(int id) => (await _repository.Get(id) != null) ? (ActionResult)Ok(await _repository.Get(id)) : NotFound();