public async Task <IDataResult <Brand> > GetByIdAsync(int id) { var findedBrand = await _brandDal.GetAsync(p => p.Id == id); if (findedBrand == null) { return(new ErrorDataResult <Brand>(null, Messages.BrandNotFound)); } return(new SuccessDataResult <Brand>(findedBrand, Messages.BrandGet)); }
public async Task <IDataResult <Brand> > GetByIdAsync(int id) { return(new SuccessDataResult <Brand>(await _brandDal.GetAsync(x => x.Id == id))); }
public async Task <IDataResult <Brand> > Get(string id) { return(new SuccessDataResult <Brand>(await _brandDal.GetAsync(b => b.Id == id))); }