public async Task Create(UserDto userDto) { await _luaScript.ExecLuaScript( LuaScript.Create, new RedisKey[] { Prefix + userDto.Id }, new RedisValue[] { userDto.Id, userDto.Code, userDto.Email, userDto.Name, userDto.Password } ); }
public async Task <int> Create(UserEntity userEntity) { await _luaScript.ExecLuaScript( LuaScript.Create, new RedisKey[] { Prefix + userEntity.Id }, new RedisValue[] { userEntity.Id, userEntity.Code, userEntity.Email, userEntity.Name, userEntity.Password } ); return(userEntity.Id); }
public async Task <IEnumerable <CurrencyEntity> > GetCurrencyAll() { var currencies = new List <CurrencyEntity>(); var data = (string[])await _luaScript.ExecLuaScript( GetAllCurrencies, new RedisKey[] { "CurrencyAll" } ); for (var pos = 0; pos < data.Length; pos += 2) { currencies.Add(new CurrencyEntity { CurrencyCode = data[pos], CurrencyRate = data[pos + 1] }); } return(currencies); }