public IResult CalculateFindeks(int identityNumber, int carId) { var result = _carService.GetByCarId(carId); var findeks = _findeksDal.Get(p => p.IdentityNumber == identityNumber); if (result.Data.FindeksScore > findeks.FindeksScore) { return(new ErrorResult("Your findeks score not enough")); } return(new SuccessResult("Success")); }
public IDataResult <Findeks> GetByCustomerId(int customerId) { var findeks = _findeksDal.Get(f => f.CustomerId == customerId); if (findeks == null) { return(new ErrorDataResult <Findeks>(Messages.FindeksNotFound)); } return(new SuccessDataResult <Findeks>(findeks)); }
public IDataResult <Findeks> GetFindexByCustomerId(int customerId) { var result = _findeksDal.Get(f => f.CustomerId == customerId); if (result == null) { return(new ErrorDataResult <Findeks>(Messages.UserHasNoFindex)); } return(new SuccessDataResult <Findeks>(result)); }
public IDataResult <Findeks> GetById(int id) { return(new SuccessDataResult <Findeks>(_findeksDal.Get(c => c.Id == id))); }
public IDataResult <Findeks> GetByCustomerId(int customerId) { return(new SuccessDataResult <Findeks>(_findeksDal.Get(f => f.CustomerId == customerId))); }
public IDataResult <Findeks> GetById(int findeksId) { return(new SuccessDataResult <Findeks>(_findeksDal.Get(f => f.FindeksId == findeksId))); }