async Task ExecuteLoadItemsCommand() { IsBusy = true; try { var result = await CoinsService.GetAllCoinsAsync(); foreach (var x in result) { Coins.Add(new CoinsModel.Value { nomeFormatado = x.nomeFormatado, tipoMoeda = x.tipoMoeda, simbolo = x.simbolo }); } LoadSelectedCoins(); } catch (Exception) { throw; } finally { IsBusy = false; } }
public static async Task <UserCoins> GetCoins(this SocketUser user) => await CoinsService.GetUserCoins("discord", Convert.ToInt64(user.Id));
public static async Task <UserCoins> AddCoins(this SocketUser user, long count) => await CoinsService.AddUserCoins("discord", Convert.ToInt64(user.Id), count);
public static async Task <UserCoins> RemoveCoins(this SocketUser user, long count, bool disableFree = false) => await CoinsService.RemoveUserCoins("discord", Convert.ToInt64(user.Id), count, disableFree);
public CoinsServiceTests(DbContextFixture fixture) { coinRepository = new CoinRepository(fixture.Context); coinsService = new CoinsService(coinRepository); }