public async Task AddSharePlaceAtRegistration(string userId, int practiceId) { var clientPractice = new ClientPractices() { ClientUserId = userId, PracticeId = practiceId }; _context.ClientPractices.Add(clientPractice); await _context.SaveChangesAsync(); }
public async Task AddSharePlaces(SharePlacesViewModel sharePlacesViewModel) { var clientPractice = new ClientPractices() { ClientUserId = _userProvider.GetUserId(), PracticeId = int.Parse(sharePlacesViewModel.SelectedPracticeId) }; _context.ClientPractices.Add(clientPractice); await _context.SaveChangesAsync(); }