Exemple #1
0
        public async Task <FavouriteClub> CreateFavouriteClub(FavouriteClub favourite)
        {
            await _trainingPlannerDbContext.FavouriteClubs.AddAsync(favourite);

            await _trainingPlannerDbContext.SaveChangesAsync();

            return(favourite);
        }
Exemple #2
0
 public async Task DeleteFavouriteClub(FavouriteClub favourite)
 {
     _trainingPlannerDbContext.FavouriteClubs.Remove(favourite);
     await _trainingPlannerDbContext.SaveChangesAsync();
 }