Esempio n. 1
0
        public async Task <Models.Backlog> CreateBacklogAsync()
        {
            var backlog = new Models.Backlog();

            backlog.Id = _idGeneratorService.GenerateId(null);

            await _backlogDataService.AddAsync(backlog);

            return(backlog);
        }
Esempio n. 2
0
        public async Task <UserProfile> CreateNewProfileAsync(UserProfile userProfile)
        {
            var allUsers     = _userProfileDataService.FindAll();
            var existingUser = allUsers.FirstOrDefault(user => user.EmailAddress == userProfile.EmailAddress);

            if (existingUser != null)
            {
                return(existingUser);
            }

            userProfile.Id = _idGeneratorService.GenerateId(userProfile.Id);

            await _userProfileDataService.AddAsync(userProfile);

            return(userProfile);
        }