Exemple #1
0
        public ActionResult <Player> AddPlayer(Player player)
        {
            _services.AddPlayer(player);

            if (player == null)
            {
                return(NotFound());
            }

            return(player);
        }
Exemple #2
0
        private async Task ExecuteAsync()
        {
            var sqliteDapper = new SqliteDapper();

            using var dbConnection = sqliteDapper.Facyory();

            var aPlayerServices = new PlayerServices(dbConnection);
            await aPlayerServices.CreatePlayer(sqliteDapper.DbPath);

            await aPlayerServices.AddPlayer();

            await aPlayerServices.GetPlayersAsync();
        }