Exemple #1
0
        public async Task <List <Training> > GetTrainingByUser(string createdBy)
        {
            await connectionProvider.EstablishConnection();

            var trainings = connectionProvider.Query <Training>("SELECT id,name,description,datetime,createdBy FROM training where createdBy=@createdBy", new { @createdBy = createdBy });

            connectionProvider.Close();
            return(trainings.ToList());
        }