public async Task <Models.Backlog> CreateBacklogAsync() { var backlog = new Models.Backlog(); backlog.Id = _idGeneratorService.GenerateId(null); await _backlogDataService.AddAsync(backlog); return(backlog); }
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); }