Example #1
0
        public async Task Insert(TeamSchedule schedule)
        {
            var pId          = new SqlParameter("@id", schedule.Id);
            var pIdTeam      = new SqlParameter("@id_team", schedule.Team.Id);
            var pCodeTeam    = new SqlParameter("@code_team", schedule.Team.Code);
            var pCompetition = new SqlParameter("@competition", schedule.Competition);
            var pStream      = new SqlParameter("@stream", schedule.Stream);
            var pDate        = new SqlParameter("@date", schedule.Date);
            var pOpponent    = new SqlParameter("@opponent", schedule.Opponent);

            try
            {
                await _sqlDataService.ExecuteNonQueryStoredProcedure("sp_InsertTeamSchedule", new[] { pId, pIdTeam, pCodeTeam, pCompetition, pStream, pDate, pOpponent });
            }
            catch (Exception)
            {
                throw;
            }
        }
        public async Task Insert(MotorSchedule schedule)
        {
            var pId          = new SqlParameter("@id", schedule.Id);
            var pIdTeam      = new SqlParameter("@id_team", schedule.Team.Id);
            var pCodeTeam    = new SqlParameter("@code_team", schedule.Team.Code);
            var pCompetition = new SqlParameter("@competition", schedule.Competition);
            var pStream      = new SqlParameter("@stream", schedule.Stream);
            var pDate        = new SqlParameter("@date", schedule.Date);
            var pCar         = new SqlParameter("@car", schedule.Car);
            var pTrack       = new SqlParameter("@track", schedule.Track);

            try
            {
                await _sqlDataService.ExecuteNonQueryStoredProcedure("sp_InsertMotorSchedule", new[] { pId, pIdTeam, pCodeTeam, pCompetition, pStream, pDate, pCar, pTrack });
            }
            catch (Exception)
            {
                throw;
            }
        }