public async Task InsertLikeValues(int colourId, int sourceId, int sweetId, string url, int idWine) { AppUser user = await _userManager.FindByEmailAsync(User.Identity.Name); await _tastesServices.InsertClickValues(colourId, sourceId, sweetId, 3, user.Id); UserScore userScore = new UserScore(); userScore.VoteValue = 0; userScore.VoteDate = DateTime.Now; userScore.AppUserId = user.Id; userScore.WineId = idWine; await _likeServices.Create(userScore); Wine wine = await _winesServices.GetWineByIdAsync(idWine); wine.Score++; await _winesServices.UpdateWineAsync(wine); Response.Redirect(url); }