Exemplo n.º 1
0
        public async Task <BotsTableModel> GetBotByBotAuthCode(string botAuthCode)
        {
            BotsTableModel result = await _db.QueryFirstAsync <BotsTableModel>(
                "GetBots_ByBotAuthCode",
                new { botAuthCode = botAuthCode },
                commandType : CommandType.StoredProcedure);

            return(result);
        }
Exemplo n.º 2
0
 public async Task CreateBot(BotsTableModel model)
 {
     await _db.ExecuteAsync(
         "CreateBot",
         new
     {
         name        = model.Name,
         botAuthCode = model.BotAuthCode,
         userId      = model.UserId
     },
         commandType : CommandType.StoredProcedure);
 }