Esempio n. 1
0
        public async Task AddSharePlaceAtRegistration(string userId, int practiceId)
        {
            var clientPractice = new ClientPractices()
            {
                ClientUserId = userId, PracticeId = practiceId
            };

            _context.ClientPractices.Add(clientPractice);

            await _context.SaveChangesAsync();
        }
Esempio n. 2
0
        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();
        }