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

            await _trainingPlannerDbContext.SaveChangesAsync();

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