コード例 #1
0
 public Merchant GetMerchant(int id) =>
 _useCache
         ? MerchantCache.Get(id, _dbContext)
         : _dbContext.Merchant.Include(i => i.MerchantIpRange).FirstOrDefault(x => x.Id == id);
コード例 #2
0
 public Merchant GetMerchant(string token) =>
 _useCache
         ? MerchantCache.Get(token, _dbContext)
         : _dbContext.Merchant.Include(i => i.MerchantIpRange).FirstOrDefault(x => x.Token == token);