Example #1
0
        public async Task <TrainerRate> UpdateTrainerRate(TrainerRate rate)
        {
            _trainingPlannerDbContext.Update(rate);
            await _trainingPlannerDbContext.SaveChangesAsync();

            return(rate);
        }
Example #2
0
        public async Task <TrainerRate> CreateTrainerRate(TrainerRate rate)
        {
            await _trainingPlannerDbContext.TrainerRatings.AddAsync(rate);

            await _trainingPlannerDbContext.SaveChangesAsync();

            return(rate);
        }
Example #3
0
 public async Task DeleteTrainerRate(TrainerRate rate)
 {
     _trainingPlannerDbContext.TrainerRatings.Remove(rate);
     await _trainingPlannerDbContext.SaveChangesAsync();
 }